Closed alex-relov closed 1 year ago
Here is an example:
class MainPageState
{
public bool Checked1 { get; set; }
public bool Checked2 { get; set; }
}
class MainPage : Component<MainPageState>
{
public override VisualNode Render()
=> new ContentPage
{
new VStack
{
new RadioButton()
.IsChecked(State.Checked1)
.OnCheckedChanged((sender, args) => SetState(s => s.Checked1 = args.Value))
,
new RadioButton()
.IsChecked(State.Checked2)
.OnCheckedChanged((sender, args) => SetState(s => s.Checked2 = args.Value))
}
.HCenter()
.VCenter(),
};
}
How to use RadioButton component in reactorui-maui?