Why does the rectangle appear in the radio buttons when one of them is clicked.
the XAML markup is given below
<RadioButton GroupName="LabelDisp" IsChecked=".. Converter={StaticResource enumBooleanConverter}, ConverterParameter= LabOnly}" Content="{x:Static resx:StringRes.RadioButtonLab}" Style="{StaticResource ListOption}" Command="{Binding Path=Command}"></RadioButton>
<RadioButton GroupName="LabelDisp" IsChecked=".. Converter={StaticResource enumBooleanConverter}, ConverterParameter= DescOnly}" Content="{x:Static resx:StringRes.RadioButtonDesc}" Style="{StaticResource ListOption}" Command="{Binding Path=Command}"></RadioButton>
<RadioButton GroupName="LabelDisp" IsChecked=".. Converter={StaticResource enumBooleanConverter}, ConverterParameter= LabAndDescr}" Content="{x:Static resx:StringRes.RadioButtonBoth}" Style="{StaticResource ListOption}" Command="{Binding Path=Command}"></RadioButton>
I was returning null should have returned Binding.Donothing instead.
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return (bool)value ? Enum.Parse(targetType, parameter.ToString(), true) : Binding.DoNothing;
}
Those are called FocusVisualStyle, you can remove it -
<RadioButton FocusVisualStyle="{x:Null}"/>
Update
Yeah H.B. is right, i thought you was talking about dotted border we got on clicking radioButton. But it seems a validation border
, check your converter code, something is breaking in it.
Looks like a validation error to me, possibly because of the spaces at the front of the ConverterParameter
. (You might want to consider using another method for binding RadioButtons)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With