I have a RadioButton element, the IsChecked property IsChecked bound to MyProperty in the ViewModel . For some reason, Binding has OneWayToSource mode, it OneWayToSource value from RadioButton.IsChecked to ViewModel.MyProperty .
RadioButton.IsChecked was initially false , now. I want to set the initial value from the ViewModel , which may even be true . I cannot do this because the property is busy with binding.
Is it possible to use Binding with this mode and set the default value for the bound property in the UI? Something like that:
<RadioButton IsChecked="{Binding MyProperty, Mode=OneWayToSource, DefaultVaule=???}"> </RadioButton>
default-value wpf binding oneway
monstr
source share