menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SfInputBase<TChecked> - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SfInputBase<TChecked>

    Base class for form input components.

    Inheritance
    System.Object
    SfBaseComponent
    SfInputBase<TChecked>
    SfCheckBox<TChecked>
    SfRadioButton<TChecked>
    SfSwitch<TChecked>
    Inherited Members
    SfBaseComponent.Dispose()
    SfBaseComponent.Dispose(Boolean)
    SfBaseComponent.OnObservableChange(String, Object, Boolean, NotifyCollectionChangedEventArgs)
    Namespace: Syncfusion.Blazor.Buttons
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public abstract class SfInputBase<TChecked> : SfBaseComponent
    Type Parameters
    Name
    TChecked

    Constructors

    SfInputBase()

    Declaration
    protected SfInputBase()

    Properties

    Checked

    Gets or sets whether to check or uncheck the component.

    Declaration
    public TChecked Checked { get; set; }
    Property Value
    Type Description
    TChecked

    true, if the component is checked. The default value is false.

    Created

    Gets or sets an event callback that is raised when the component rendering is completed.

    Declaration
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.EventCallback<System.Object>

    An event callback function.

    CssClass

    Gets or sets a value that indicates CSS class string to customize the appearance of the component.

    Declaration
    public string CssClass { get; set; }
    Property Value
    Type Description
    System.String

    Accepts a CSS class string separated by space to customize the appearance of the component. The default value is String.Empty.

    Disabled

    Gets or sets a value that indicates whether to enable or disable the component.

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

    true, if the component is disabled. The default value is false.

    EnablePersistence

    Gets or sets a value that indicates whether to persist component's state between page reloads. When set to true, the Checked property is persisted.

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

    true, if the component's state persistence is enabled. The default value is false.

    Remarks

    Component's Checked property will be stored in browser local storage to persist component's state when page reloads.

    EnableRtl

    Gets or sets a value that indicates whether to enable or disable the right to left direction option for the component.

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

    true, if the right to left direction is enabled for the component. The default value is false.

    Name

    Gets or sets a value that indicates the name of the component.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    Accepts a string value. The default value is String.Empty.

    Remarks

    The Name property is used to set the name attribute of input element.

    Value

    Gets or sets a value that indicates the value of the component.

    Declaration
    public string Value { get; set; }
    Property Value
    Type Description
    System.String

    Accepts a string value. The default value is String.Empty.

    Remarks

    The Value property is used to set the value attribute of input element.

    Methods

    FocusAsync()

    focuses the component to perform check/uncheck.

    Declaration
    public Task FocusAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    System.Threading.Tasks.Task.

    GetPersistData()

    Declaration
    protected Task<string> GetPersistData()
    Returns
    Type
    System.Threading.Tasks.Task<System.String>

    InitRender(Boolean)

    Declaration
    protected virtual void InitRender(bool isDynamic = false)
    Parameters
    Type Name Description
    System.Boolean isDynamic

    OnAfterRenderAsync(Boolean)

    Declaration
    protected override Task OnAfterRenderAsync(bool firstRender)
    Parameters
    Type Name Description
    System.Boolean firstRender
    Returns
    Type
    System.Threading.Tasks.Task
    Overrides
    SfBaseComponent.OnAfterRenderAsync(Boolean)

    OnInitializedAsync()

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type
    System.Threading.Tasks.Task
    Overrides
    SfBaseComponent.OnInitializedAsync()

    OnParametersSetAsync()

    Declaration
    protected override Task OnParametersSetAsync()
    Returns
    Type
    System.Threading.Tasks.Task

    SetLocalStorage(String, TChecked)

    Declaration
    protected Task SetLocalStorage(string persistId, TChecked isChecked)
    Parameters
    Type Name Description
    System.String persistId
    TChecked isChecked
    Returns
    Type
    System.Threading.Tasks.Task

    UpdateCheckState(TChecked)

    Declaration
    protected Task UpdateCheckState(TChecked state)
    Parameters
    Type Name Description
    TChecked state
    Returns
    Type
    System.Threading.Tasks.Task
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved