C# Class System.Windows.Controls.EnumToBooleanConverter

Converts an enum to a boolean value, if the parameter has the same value as the enum value.
Inheritance: IValueConverter
Datei anzeigen Open project: lecode-official/mvvm-framework

Public Methods

Method Description
Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Converts the value parameter to a boolean value.

ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Converts a boolean value back to an enum value.

Method Details

Convert() public method

Converts the value parameter to a boolean value.
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The value of an enum that is to be converted.
targetType Type The type to which the value is to be converted. In this case it is always boolean.
parameter object A parameter that determines the value to which the value has to be equal to return true.
culture System.Globalization.CultureInfo The culture information of the current culture, so that parsing can be adjusted to cultural conventions.
return object

ConvertBack() public method

Converts a boolean value back to an enum value.
public ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The value that is to be converted.
targetType Type The type to which the value is to be converted. In this case it is an enum type.
parameter object A parameter whose enum value is returned.
culture System.Globalization.CultureInfo The culture information of the current culture, so that parsing can be adjusted to cultural conventions.
return object