Skip to content

ToggleButtonBase Class

Base class for toggle button controls, such as CheckBox and RadioButton.

C#
[DataContract]
public abstract class ToggleButtonBase : ButtonBase

Inheritance objectControlBaseButtonBase

Creates an instance of the button control with the specified width and height.

C#
protected ToggleButtonBase(int width, int height)

width int
Width of the control.

height int
Height of the control (default is 1).

Creates an automatically sized button.

C#
protected ToggleButtonBase()

Gets or sets the selected state of the radio button.

C#
public bool IsSelected { get; set; }

Radio buttons within the same group will set their IsSelected property to the opposite of this radio button when you set this property.

Raises the IsSelectedChanged event.

C#
protected virtual void OnIsSelected()

Raised when the selected state of the radio button is changed.

C#
public event EventHandler? IsSelectedChanged

EventHandler