Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class GlobalOptions

    Show / Hide Table of Contents

    Class GlobalOptions

    A class that provides options to configure global settings for our Syncfusion Blazor components.

    Inheritance
    System.Object
    GlobalOptions
    Namespace: Syncfusion.Blazor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class GlobalOptions : Object
    Examples
    services.AddSyncfusionBlazor(options =>
    {
        options.IgnoreScriptIsolation = true;
    });

    Constructors

    GlobalOptions()

    Declaration
    public GlobalOptions()

    Properties

    Animation

    Gets or sets global options to control animation behaviors for animation supported Syncfusion Blazor components.

    Declaration
    public GlobalAnimationMode Animation { get; set; }
    Property Value
    Type Description
    GlobalAnimationMode

    Default, if the animation works in all the Syncfusion Blazor components based on its animation property value. Enable/Disable, to control the animation in all the Syncfusion Blazor components. The default value is 'Default'.

    Remarks

    Control the animation globally in all Syncfusion Blazor components. By default, the animation works based on the individual component's animation property value. But the animation is enabled or disabled globally in all Syncfusion Blazor components by configure this GlobalOptions property as Enable/Disable. For example, If GlobalOptions.Animation is �Enable� and Blazor Chart animation is false, the animation applies to the Blazor Chart component. If GlobalOptions.Animation is �Disable� and Blazor Chart animation is true, the animation doesn't applies to the Chart component.

    EnableRippleEffect

    Specifies whether the ripple effect is enabled in the application.

    Declaration
    public bool EnableRippleEffect { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the ripple effect is enabled in the application. The default value is false.

    EnableRtl

    Specifies whether the Rtl mode enabled in the application.

    Declaration
    public bool EnableRtl { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the Rtl mode enabled in the application. The default value is false.

    IgnoreScriptIsolation

    Gets or sets whether the Syncfusion Blazor scripts are loaded internally using JavaScript Isolation or refer to the required scripts from the application-end for better performance.

    Declaration
    public bool IgnoreScriptIsolation { get; set; }
    Property Value
    Type Description
    System.Boolean

    true, if the scripts should be referenced externally in the application-end from NuGet or CDN or by generating from CRG. The default value is true.

    Remarks

    When the property value is false, the Blazor scripts are loaded from built-in source using JavaScript Isolation internally.

    Examples

    You can add script reference in one of the following ways externally for better performance when IgnoreScriptIsolation is true.

    Reference scripts from NuGet

    To add script reference for all component except PdfViewer and DocumentEditor.
    <script  src="_content/Syncfusion.Blazor/scripts/syncfusion-blazor.min.js"  type="text/javascript"></script>
    To add script reference for PdfViewer.
    <script  src="_content/Syncfusion.Blazor.PdfViewer/scripts/syncfusion-blazor-pdfviewer.min.js"  type="text/javascript"></script>
    To add script reference for DocumentEditor.
    <script  src="_content/Syncfusion.Blazor.WordProcessor/scripts/syncfusion-blazor-documenteditor.min.js"  type="text/javascript"></script>

    Reference scripts from CDN

    To add script reference for all component except PdfViewer and DocumentEditor.
    <script  src="https://cdn.syncfusion.com/blazor/19.3.43/syncfusion-blazor.min.js"  type="text/javascript"></script>
    To add script reference for PdfViewer.
    <script  src="https://cdn.syncfusion.com/blazor/19.3.43/syncfusion-blazor-pdfviewer.min.js"  type="text/javascript"></script>
    To add script reference for DocumentEditor.
    <script  src="https://cdn.syncfusion.com/blazor/19.3.43/syncfusion-blazor-documenteditor.min.js"  type="text/javascript"></script>
    Note: Ensure to change the version in CDN link based on the syncfusion version you are using.

    Reference scripts by generating from Blazor CRG for only used components

    Generate a required component script and styles from Blazor custom resource generator(Blazor CRG) and refer to them in your application.
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved