Daniel's XL Toolbox NG
Bovender.Mvvm.Converters.EnumBooleanConverter Class Reference

Converts enum values to booleans to enable easy use of enumerations with WPF radio buttons. More...

Inheritance diagram for Bovender.Mvvm.Converters.EnumBooleanConverter:
Collaboration diagram for Bovender.Mvvm.Converters.EnumBooleanConverter:

Public Member Functions

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)
 

Detailed Description

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>
]]>

Member Function Documentation

◆ Convert() [1/2]

object Bovender.Mvvm.Converters.EnumBooleanConverter.Convert ( object  value,
Type  targetType,
object  parameter,
System.Globalization.CultureInfo  culture 
)
inline

◆ Convert() [2/2]

object Bovender.Mvvm.Converters.EnumBooleanConverter.Convert ( object  value,
Type  targetType,
object  parameter,
System.Globalization.CultureInfo  culture 
)
inline

◆ ConvertBack() [1/2]

object Bovender.Mvvm.Converters.EnumBooleanConverter.ConvertBack ( object  value,
Type  targetType,
object  parameter,
System.Globalization.CultureInfo  culture 
)
inline

◆ ConvertBack() [2/2]

object Bovender.Mvvm.Converters.EnumBooleanConverter.ConvertBack ( object  value,
Type  targetType,
object  parameter,
System.Globalization.CultureInfo  culture 
)
inline

The documentation for this class was generated from the following file: