Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenToggleButton

    RadzenButton component.

    Inheritance
    object
    ComponentBase
    RadzenComponent
    RadzenButton
    RadzenToggleButton
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent
    Inherited Members
    RadzenButton.ChildContent
    RadzenButton.TabIndex
    RadzenButton.Text
    RadzenButton.ImageAlternateText
    RadzenButton.Icon
    RadzenButton.IconColor
    RadzenButton.Image
    RadzenButton.ButtonStyle
    RadzenButton.ButtonType
    RadzenButton.Variant
    RadzenButton.Shade
    RadzenButton.Size
    RadzenButton.Disabled
    RadzenButton.Click
    RadzenButton.IsBusy
    RadzenButton.BusyText
    RadzenButton.IsDisabled
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, int)
    RadzenComponent.OnInitialized()
    RadzenComponent.OnAfterRenderAsync(bool)
    RadzenComponent.RaiseContextMenu(MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.CurrentStyle
    ComponentBase.OnInitializedAsync()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.StateHasChanged()
    ComponentBase.ShouldRender()
    ComponentBase.OnAfterRender(bool)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.DispatchExceptionAsync(Exception)
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: Radzen.Blazor
    Assembly: Radzen.Blazor.dll
    Syntax
    public class RadzenToggleButton : RadzenButton, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent
    Examples
    <RadzenToggleButton Click=@(args => Console.WriteLine("Button clicked")) Text="ToggleButton" />

    Constructors

    RadzenToggleButton()

    RadzenButton component.

    Declaration
    public RadzenToggleButton()
    Examples
    <RadzenToggleButton Click=@(args => Console.WriteLine("Button clicked")) Text="ToggleButton" />

    Fields

    _value

    The value

    Declaration
    protected bool _value
    Field Value
    Type Description
    bool

    Properties

    Change

    Gets or sets the change.

    Declaration
    [Parameter]
    public EventCallback<bool> Change { get; set; }
    Property Value
    Type Description
    EventCallback<bool>

    The change.

    CurrentPlaceholder

    Gets the current placeholder. Returns empty string if this component is inside a RadzenFormField.

    Declaration
    protected string CurrentPlaceholder { get; }
    Property Value
    Type Description
    string

    EditContext

    Gets or sets the edit context.

    Declaration
    [CascadingParameter]
    public EditContext EditContext { get; set; }
    Property Value
    Type Description
    EditContext

    The edit context.

    FieldIdentifier

    Gets the field identifier.

    Declaration
    [Parameter]
    public FieldIdentifier FieldIdentifier { get; set; }
    Property Value
    Type Description
    FieldIdentifier

    The field identifier.

    Form

    Gets or sets the form.

    Declaration
    [CascadingParameter]
    public IRadzenForm Form { get; set; }
    Property Value
    Type Description
    IRadzenForm

    The form.

    FormFieldContext

    Provides support for RadzenFormField integration.

    Declaration
    [CascadingParameter]
    public IFormFieldContext FormFieldContext { get; set; }
    Property Value
    Type Description
    IFormFieldContext

    HasValue

    Gets a value indicating whether this instance has value.

    Declaration
    public virtual bool HasValue { get; }
    Property Value
    Type Description
    bool

    true if this instance has value; otherwise, false.

    InputAttributes

    Specifies additional custom attributes that will be rendered by the input.

    Declaration
    [Parameter]
    public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>

    The attributes.

    IsBound

    Gets a value indicating whether this instance is bound.

    Declaration
    public bool IsBound { get; }
    Property Value
    Type Description
    bool

    true if this instance is bound; otherwise, false.

    Name

    Gets or sets the name.

    Declaration
    [Parameter]
    public string Name { get; set; }
    Property Value
    Type Description
    string

    The name.

    Placeholder

    Gets or sets the placeholder.

    Declaration
    [Parameter]
    public string Placeholder { get; set; }
    Property Value
    Type Description
    string

    The placeholder.

    ToggleButtonStyle

    Gets or sets the ToggleButton style.

    Declaration
    [Parameter]
    public ButtonStyle ToggleButtonStyle { get; set; }
    Property Value
    Type Description
    ButtonStyle

    The ToggleButton style.

    ToggleIcon

    Gets or sets the toggle icon.

    Declaration
    [Parameter]
    public string ToggleIcon { get; set; }
    Property Value
    Type Description
    string

    The toggle icon.

    ToggleShade

    Gets or sets the ToggleButton shade.

    Declaration
    [Parameter]
    public Shade ToggleShade { get; set; }
    Property Value
    Type Description
    Shade

    The ToggleButton shade.

    Value

    Gets or sets the value.

    Declaration
    [Parameter]
    public virtual bool Value { get; set; }
    Property Value
    Type Description
    bool

    The value.

    ValueChanged

    Gets or sets the value changed.

    Declaration
    [Parameter]
    public EventCallback<bool> ValueChanged { get; set; }
    Property Value
    Type Description
    EventCallback<bool>

    The value changed.

    ValueExpression

    Gets or sets the value expression.

    Declaration
    [Parameter]
    public Expression<Func<bool>> ValueExpression { get; set; }
    Property Value
    Type Description
    Expression<Func<bool>>

    The value expression.

    Methods

    BuildRenderTree(RenderTreeBuilder)

    RadzenButton component.

    Declaration
    protected override void BuildRenderTree(RenderTreeBuilder __builder)
    Parameters
    Type Name Description
    RenderTreeBuilder __builder
    Overrides
    RadzenButton.BuildRenderTree(RenderTreeBuilder)

    Dispose()

    Disposes this instance.

    Declaration
    public override void Dispose()
    Overrides
    RadzenComponent.Dispose()

    FocusAsync()

    Sets the focus.

    Declaration
    public virtual ValueTask FocusAsync()
    Returns
    Type Description
    ValueTask

    GetComponentCssClass()

    Gets the component CSS class.

    Declaration
    protected override string GetComponentCssClass()
    Returns
    Type Description
    string
    Overrides
    RadzenButton.GetComponentCssClass()

    GetValue()

    Gets the value.

    Declaration
    public object GetValue()
    Returns
    Type Description
    object

    System.Object.

    OnClick(MouseEventArgs)

    Handles the Click event.

    Declaration
    public override Task OnClick(MouseEventArgs args)
    Parameters
    Type Name Description
    MouseEventArgs args

    The MouseEventArgs instance containing the event data.

    Returns
    Type Description
    Task
    Overrides
    RadzenButton.OnClick(MouseEventArgs)

    OnContextMenu(MouseEventArgs)

    Handles the ContextMenu event.

    Declaration
    public override Task OnContextMenu(MouseEventArgs args)
    Parameters
    Type Name Description
    MouseEventArgs args

    The MouseEventArgs instance containing the event data.

    Returns
    Type Description
    Task

    Task.

    Overrides
    RadzenComponent.OnContextMenu(MouseEventArgs)

    SetParametersAsync(ParameterView)

    Sets the parameters asynchronous.

    Declaration
    public override Task SetParametersAsync(ParameterView parameters)
    Parameters
    Type Name Description
    ParameterView parameters

    The parameters.

    Returns
    Type Description
    Task

    Task.

    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT