RadioButton Class
Definition
Section titled “Definition”Represents a button that can be toggled on/off within a group of other buttons.
[DataContract]public class RadioButton : ToggleButtonBaseInheritance object → ControlBase → ButtonBase → ToggleButtonBase
Constructors
Section titled “Constructors”RadioButton(int, int)
Section titled “RadioButton(int, int)”Creates a new radio button control with the specified width and height.
public RadioButton(int width, int height)Parameters
Section titled “Parameters”width int
Width of the control.
height int
Height of the control.
RadioButton(string)
Section titled “RadioButton(string)”Creates an auto sizing radio button control with the specified text.
public RadioButton(string text)Parameters
Section titled “Parameters”text string
Properties
Section titled “Properties”GroupName
Section titled “GroupName”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.
public string GroupName { get; set; }LeftBracketGlyph
Section titled “LeftBracketGlyph”The glyph for the left-side bracket of the icon.
[DataMember]public int LeftBracketGlyph { get; set; }RightBracketGlyph
Section titled “RightBracketGlyph”The glyph for the right-side bracket of the icon.
[DataMember]public int RightBracketGlyph { get; set; }CheckedIconGlyph
Section titled “CheckedIconGlyph”The glyph of the icon when checked.
[DataMember]public int CheckedIconGlyph { get; set; }UncheckedIconGlyph
Section titled “UncheckedIconGlyph”The glyph of the icon when unchecked.
[DataMember]public int UncheckedIconGlyph { get; set; }CheckedIconColor
Section titled “CheckedIconColor”An optional color of the CheckedIconGlyph.
[DataMember]public Color? CheckedIconColor { get; set; }UncheckedIconColor
Section titled “UncheckedIconColor”An optional color of the UncheckedIconGlyph.
[DataMember]public Color? UncheckedIconColor { get; set; }BracketsThemeState
Section titled “BracketsThemeState”The theme state used with the brackets.
public ThemeStates BracketsThemeState { get; protected set; }IconThemeState
Section titled “IconThemeState”The theme state used with the icon of the
public ThemeStates IconThemeState { get; protected set; }Methods
Section titled “Methods”OnClick()
Section titled “OnClick()”Performs a click on the base button and also toggles the IsSelected property.
protected override void OnClick()OnIsSelected()
Section titled “OnIsSelected()”Raises the IsSelectedChanged event and when IsSelected is true, deselects any other RadioButton with the same GroupName.
protected override void OnIsSelected()RefreshThemeStateColors(Colors)
Section titled “RefreshThemeStateColors(Colors)”Updates the ThemeState by calling RefreshTheme(Colors) with the provided colors. Override this method to adjust how colors are used by the ThemeState.
protected override void RefreshThemeStateColors(Colors colors)Parameters
Section titled “Parameters”colors Colors
The colors to apply to the theme state.
UpdateAndRedraw(TimeSpan)
Section titled “UpdateAndRedraw(TimeSpan)”Redraws the control if applicable.
public override void UpdateAndRedraw(TimeSpan time)Parameters
Section titled “Parameters”time TimeSpan
The duration of thecurrent frame.
CreateControlSurface()
Section titled “CreateControlSurface()”Resizes the control surface based on AutoSize or the Width and Height properties.
protected override ICellSurface CreateControlSurface()Returns
Section titled “Returns”ICellSurface
The control’s surface.