For Example: We need to dynamically bind a RadioButton Value property with two different properties of ViewModel.
View Model
public class MyViewModel { //Property-1 to bind with RadioButton public bool Accepted { get; set; } //Property-2 to bind with RadioButton public bool Enable { get; set; } //Property to Identify which property should bind with radio button. public bool Mode { get; set; } } Xaml
<RadioButton Value="{Binding Accepted, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/> Is it possible to dynamically bind Accepted or Enable property according to the Mode property?
- One solution came up is using IMultiValueConverter and MultiBinding. Is it a proper method?