Class RadioButton
- Namespace
- Myra.Graphics2D.UI
- Assembly
- Myra.dll
A radio button widget that can be part of a group where only one button can be selected at a time.
public class RadioButton : CheckButtonBase, IItemWithId, INotifyAttachedPropertyChanged, IContent
- Inheritance
-
RadioButton
- Implements
- Inherited Members
Constructors
RadioButton(Stylesheet, string)
Initializes a new instance of the RadioButton class with the specified stylesheet and style.
public RadioButton(Stylesheet stylesheet, string styleName = "")
Parameters
stylesheetStylesheetThe stylesheet to use for applying the style.
styleNamestringThe name of the style to apply. Defaults to the default stylesheet style.
RadioButton(string)
Initializes a new instance of the RadioButton class with the specified style.
public RadioButton(string styleName = "")
Parameters
styleNamestringThe name of the style to apply. Defaults to the default stylesheet style.
Properties
IsPressed
Gets or sets a value indicating whether this radio button is pressed/selected. Only one radio button in a group can be pressed at a time.
public override bool IsPressed { get; set; }
Property Value
Methods
OnPressedChanged()
Handles the pressed state change, deselecting other radio buttons in the same parent when this button is pressed.
public override void OnPressedChanged()