Hi CarloGoretti-1185,
Welcome to our Microsoft Q&A platform!
The SelectedValue property is updated to the Value property of the checked RadioButton.
Here is a demo you can refer to.
XAML:
<StackLayout RadioButtonGroup.GroupName="TrainingStyleRB"
RadioButtonGroup.SelectedValue="{Binding Color}">
<Label Text="{Binding Color, StringFormat='The Selection is {0}'}"/>
<RadioButton Content="Red"
Value="Red"/>
<RadioButton Content="Green"
Value="Green"/>
<RadioButton Content="Blue"
Value="Blue"/>
<RadioButton Content="Other"
Value="Other"/>
</StackLayout>
ViewModel:
class MainPageViewModel : INotifyPropertyChanged
{
string color;
public string Color
{
get => color;
set
{
color = value;
OnPropertyChanged("Color");
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged(string propertyName)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new PropertyChangedEventArgs(propertyName));
}
public MainPageViewModel()
{
Color = "Red";
}
}
Regards,
Kyle
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.