Class ToggleButtonBase
Base class for toggle button controls, such as CheckBox and RadioButton.
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
[DataContract]
public abstract class ToggleButtonBase : ButtonBase
Constructors
ToggleButtonBase()
Creates an automatically sized button.
Declaration
protected ToggleButtonBase()
ToggleButtonBase(int, int)
Creates an instance of the button control with the specified width and height.
Declaration
protected ToggleButtonBase(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | Width of the control. |
int | height | Height of the control (default is 1). |
Properties
IsSelected
Gets or sets the selected state of the radio button.
Declaration
public bool IsSelected { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Radio buttons within the same group will set their IsSelected property to the opposite of this radio button when you set this property.
Methods
OnIsSelected()
Raises the IsSelectedChanged event.
Declaration
protected virtual void OnIsSelected()
Events
IsSelectedChanged
Raised when the selected state of the radio button is changed.
Declaration
public event EventHandler? IsSelectedChanged
Event Type
Type | Description |
---|---|
EventHandler |