ClassEnumToBooleanConverter
Represents converter, which converts Enum types to and from a boolean value using the given parameter.
Definition
Namespace:Telerik.Core
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public class EnumToBooleanConverter : IValueConverter
Inheritance: objectEnumToBooleanConverter
Implements:
Constructors
EnumToBooleanConverter()
Declaration
public EnumToBooleanConverter()
Methods
Convert(object, Type, object, string)
Converts a Enum value to a Boolean one if it is one from the
specified in the parameter values.
Declaration
public object Convert(object value, Type targetType, object parameter, string language)
Parameters
value
The Enum value .
targetType
This parameter is not used.
parameter
One or more values, which will be check for equality
against the passed value.Characters: ',' or ';' can be used to split
multiple values.
language
Returns
A boolean value indicating whether the given value is one from the specified in
the parameter. Returns null if the value or
parameter are null.
ConvertBack(object, Type, object, string)
Converts the Boolean value back to the first Enum value passed in the
parameter.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, string language)
Parameters
value
The Boolean value.
targetType
This parameter is not used.
parameter
One or more Enum values. The first one will be return if the value
is true.
language
Returns
First Enum value from the parameter if the value is true,
otherwise Empty.