You can use IValueConverter for this..
Have a look on the below code...
<RadioButton GroupName="Group1" IsChecked="{Binding PropertyValue}" Content="Male" />
<RadioButton GroupName="Group1" Content="Female" IsChecked="{Binding PropertyValue, Converter={StaticResource BoolInverterConverter}}" >
public class BoolInverterConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool)
{
return !(bool)value;
}
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool)
{
return !(bool)value;
}
return value;
}
#endregion
}
This is for your sample purpose...you have to modify the code..
If you find this as useful..rate it..