Class RadioButton
Represents a button that allows a user to select a single option from a group of options.
public class RadioButton : ToggleButton, INotifyPropertyChanged, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ICommandSource, ILogical
- Inheritance
-
RadioButton
- Implements
- Inherited Members
- Extension Methods
Constructors
RadioButton()
public RadioButton()
Fields
GroupNameProperty
Identifies the GroupName dependency property.
public static readonly StyledProperty<string?> GroupNameProperty
Field Value
Properties
GroupName
Gets or sets the name that specifies which RadioButton controls are mutually exclusive.
public string? GroupName { get; set; }
Property Value
Methods
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
OnCreateAutomationPeer()
Returns a new, type-specific AutomationPeer implementation for the control.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer
The type-specific AutomationPeer implementation.
OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is removed from a rooted visual tree.
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
Toggle()
Toggles the IsChecked property.
protected override void Toggle()