Class
ViewDefinitionToBoolConverter

Converts a ViewDefinitionBase to a boolean based on whether its type name matches any of the expected type names. This converter is useful for conditionally showing or hiding UI elements based on the active view definition.

Definition

Namespace:Telerik.Maui.Controls.Scheduler

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class ViewDefinitionToBoolConverter : IValueConverter

Inheritance: objectViewDefinitionToBoolConverter

Implements: IValueConverter

Constructors

ViewDefinitionToBoolConverter()

Declaration

cs-api-definition
public ViewDefinitionToBoolConverter()

Methods

Convert(object, Type, object, CultureInfo)

Converts a ViewDefinitionBase value to a boolean indicating whether its type name matches any of the expected type names.

Declaration

cs-api-definition
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

Parameters

value

object

The ViewDefinitionBase instance to check. Expected to be of type ViewDefinitionBase.

targetType

Type

The type of the binding target property. This parameter is not used.

parameter

object

Converter parameter containing comma-separated type names. Example: "DayViewDefinition,WeekViewDefinition"

culture

CultureInfo

The culture to use in the converter. This parameter is not used.

Returns

object

true if the value's type name matches any of the expected type names; false if the value's type name doesn't match any expected type names; false if the value is null or no parameter is specified.

ConvertBack(object, Type, object, CultureInfo)

Converts a boolean value back to a ViewDefinitionBase. This method is not implemented.

Declaration

cs-api-definition
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

Parameters

value

object

The value to convert back.

targetType

Type

The type to convert to.

parameter

object

Optional converter parameter.

culture

CultureInfo

The culture to use in the converter.

Returns

object

Not implemented. Throws NotImplementedException.

Exceptions

NotImplementedException

This method is not implemented as two-way binding is not supported.