alexa
menu

Blazor Toolkit

    Show / Hide Table of Contents

    Class SfBaseComponent

    Base class for all Syncfusion Blazor Toolkit components, centralizing lifecycle logic, JavaScript interop abstraction, property-change tracking, and shared module imports.

    Inheritance
    System.Object
    SfBaseComponent
    Button
    SfButton
    SfButtonGroup
    MaskPlaceholder
    ChartRenderer
    ChartSubComponent
    SfInputBase<TValue>
    SfSelectionBase<TChecked>
    SfUploader
    UploadedFile
    UploadedFiles
    UploaderAsyncSettings
    UploaderButtons
    DialogAnimationSettings
    DialogButton
    DialogButtons
    DialogPositionData
    DialogTemplates
    SfDialog
    SfTooltip
    SfSpinner
    SpinnerTemplates
    Implements
    System.IAsyncDisposable
    Namespace: Syncfusion.Blazor.Toolkit
    Assembly: Syncfusion.Blazor.Toolkit.dll
    Syntax
    public abstract class SfBaseComponent : ComponentBase, IAsyncDisposable
    Remarks

    Derived components must inherit from SfBaseComponent to receive:

    • Automatic property-change tracking via Syncfusion.Blazor.Toolkit.SfBaseComponent.NotifyPropertyChanges``1(System.String,``0,``0).
    • Runtime-agnostic JavaScript interop through Syncfusion.Blazor.Toolkit.SfBaseComponent.InvokeVoidAsync(Microsoft.JSInterop.IJSObjectReference,Microsoft.JSInterop.IJSInProcessObjectReference,System.String,System.Object[]) and Syncfusion.Blazor.Toolkit.SfBaseComponent.InvokeAsync``1(Microsoft.JSInterop.IJSObjectReference,Microsoft.JSInterop.IJSInProcessObjectReference,System.String,System.Object[]).
    • Lazy loading of shared JS modules (base, animation, draggable, popup, touch).
    • Touch-device detection and static-server rendering awareness.

    Constructors

    SfBaseComponent()

    Declaration
    protected SfBaseComponent()

    Methods

    DisposeAsync()

    Releases unmanaged resources, JavaScript module references, and DotNet object references for this component.

    Declaration
    public ValueTask DisposeAsync()
    Returns
    Type
    System.Threading.Tasks.ValueTask
    Remarks

    The base implementation clears Syncfusion.Blazor.Toolkit.SfBaseComponent.PropertyChanges, disposes each imported JS module (Syncfusion.Blazor.Toolkit.SfBaseComponent._baseJsModule, Syncfusion.Blazor.Toolkit.SfBaseComponent._animationJsModule, , Syncfusion.Blazor.Toolkit.SfBaseComponent._popupJsModule, Syncfusion.Blazor.Toolkit.SfBaseComponent._touchJsModule), and disposes the Syncfusion.Blazor.Toolkit.SfBaseComponent.DotnetObjectReference bridge.

    A Microsoft.JSInterop.JSDisconnectedException is caught and ignored because the circuit may disconnect (page reload) before JS disposal completes.

    Derived components that hold additional disposable resources should override Syncfusion.Blazor.Toolkit.SfBaseComponent.DisposeAsyncCore() rather than replacing this method.

    Implements

    System.IAsyncDisposable
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved