Quantcast
Channel: User Liyun Zhang - MSFT - Stack Overflow
Viewing all articles
Browse latest Browse all 444

Answer by Liyun Zhang - MSFT for .NET 8 MAUI and RadioButton: how to set the default value?

$
0
0

As Jason said, you shoud bind the Value property for the RadioButton. Such as:

<BindableLayout.ItemTemplate><DataTemplate><RadioButton            x:Name="radio"            Margin="0,0,15,0"            Content="{Binding .}"            Value="{Binding .}"            GroupName="MenuCategories">

And then the selected value will show correctly. For more information, you can refer to the official document about Responding to a property change.


Viewing all articles
Browse latest Browse all 444

Trending Articles