Skip to content

RadioButton Class

Represents a button that can be toggled on/off within a group of other buttons.

C#
[DataContract]
public class RadioButton : ToggleButtonBase

Inheritance objectControlBaseButtonBaseToggleButtonBase

Creates a new radio button control with the specified width and height.

C#
public RadioButton(int width, int height)

width int
Width of the control.

height int
Height of the control.

Creates an auto sizing radio button control with the specified text.

C#
public RadioButton(string text)

text string

The group of the radio button. All radio buttons with the same group name will work together to keep one radio button selected at a time.

C#
public string GroupName { get; set; }

The glyph for the left-side bracket of the icon.

C#
[DataMember]
public int LeftBracketGlyph { get; set; }

The glyph for the right-side bracket of the icon.

C#
[DataMember]
public int RightBracketGlyph { get; set; }

The glyph of the icon when checked.

C#
[DataMember]
public int CheckedIconGlyph { get; set; }

The glyph of the icon when unchecked.

C#
[DataMember]
public int UncheckedIconGlyph { get; set; }

An optional color of the CheckedIconGlyph.

C#
[DataMember]
public Color? CheckedIconColor { get; set; }

An optional color of the UncheckedIconGlyph.

C#
[DataMember]
public Color? UncheckedIconColor { get; set; }

The theme state used with the brackets.

C#
public ThemeStates BracketsThemeState { get; protected set; }

The theme state used with the icon of the

C#
public ThemeStates IconThemeState { get; protected set; }

Performs a click on the base button and also toggles the IsSelected property.

C#
protected override void OnClick()

Raises the IsSelectedChanged event and when IsSelected is true, deselects any other RadioButton with the same GroupName.

C#
protected override void OnIsSelected()

Updates the ThemeState by calling RefreshTheme(Colors) with the provided colors. Override this method to adjust how colors are used by the ThemeState.

C#
protected override void RefreshThemeStateColors(Colors colors)

colors Colors
The colors to apply to the theme state.

Redraws the control if applicable.

C#
public override void UpdateAndRedraw(TimeSpan time)

time TimeSpan
The duration of thecurrent frame.

Resizes the control surface based on AutoSize or the Width and Height properties.

C#
protected override ICellSurface CreateControlSurface()

ICellSurface
The control’s surface.