Option
Description
The Option component represents a single mutually exclusive choice inside a ChoiceGroup. In the public API, the helper method is Choice(...), and the underlying type is ChoiceGroup.Choice.
Use it when you need radio-button style selection where exactly one option should be active within a group.
Usage
Create options with Choice(...) and place them inside ChoiceGroup(...). The group manages shared selection state and exposes the selected option as an observable value.
Methods
Disabled(bool value = true)enables or disables the option.Selected()marks the option as selected.SelectedIf(bool shouldSelect)conditionally selects the option.SetText(string text)updates the displayed label.OnSelected(ComponentEventHandler<ChoiceGroup.Choice> onSelected)registers a callback when this option becomes selected.Render()returns the label-wrapped radio element.
Properties
Textgets or sets the displayed label.IsEnabledgets or sets whether the option can be interacted with.IsSelectedgets or sets the selected state.- Text-formatting properties such as
Size,Weight, andTextAlignare available on the component.