Class
EnumToBooleanConverter

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:

cs-api-definition
public class EnumToBooleanConverter : IValueConverter

Inheritance: objectEnumToBooleanConverter

Implements: IValueConverter

Constructors

EnumToBooleanConverter()

Declaration

cs-api-definition
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

cs-api-definition
public object Convert(object value, Type targetType, object parameter, string language)

Parameters

value

object

The Enum value .

targetType

Type

This parameter is not used.

parameter

object

One or more values, which will be check for equality against the passed value.Characters: ',' or ';' can be used to split multiple values.

language

string

Returns

object

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

cs-api-definition
public object ConvertBack(object value, Type targetType, object parameter, string language)

Parameters

value

object

The Boolean value.

targetType

Type

This parameter is not used.

parameter

object

One or more Enum values. The first one will be return if the value is true.

language

string

Returns

object

First Enum value from the parameter if the value is true, otherwise Empty.