Converts enum values to booleans to enable easy use of enumerations with WPF radio buttons.
More...
|
object | Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
object | ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
object | Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
object | ConvertBack (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
Converts enum values to booleans to enable easy use of enumerations with WPF radio buttons.
Credits to Scott @ http://stackoverflow.com/a/2908885/270712
<![CDATA[
<StackPanel>
<StackPanel.Resources>
<local:EnumToBooleanConverter x:Key="ebc" />
</StackPanel.Resources>
<RadioButton IsChecked="{Binding Path=YourEnumProperty,
Converter={StaticResource ebc},
ConverterParameter={x:Static local:YourEnumType.Enum1}}" />
<RadioButton IsChecked="{Binding Path=YourEnumProperty,
Converter={StaticResource ebc},
ConverterParameter={x:Static local:YourEnumType.Enum2}}" />
</StackPanel>
]]>