ToggleButton
Description
A button that maintains a checked state. Created by calling .ToToggle() on an existing Button, so all standard button styling (icons, sizes, colours, hotkeys) is inherited.
Usage
API reference
public class ToggleButton : IComponentA ToggleButton component that behaves like a button but maintains a checked state.
Constructors
Properties
public bool IsChecked { get ; set ; }Gets or sets whether the toggle button is checked.
Methods
public ToggleButton OnChange(ComponentEventHandler<ToggleButton, Event> onChange)Adds a change event handler to the toggle button.
Parameters
- onChange
- The event handler.
Returns
The current instance of the type.
public HTMLElement Render()Renders the toggle button.
Returns
The rendered HTMLElement.
public ToggleButton Disabled(bool value = true)Sets whether the toggle button is disabled.
Parameters
- value
- Whether to disable the toggle button.
Returns
The current instance of the type.