New to Telerik UI for .NET MAUIStart a free 30-day trial

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:

C#
public class ViewDefinitionToBoolConverter : IValueConverter

Inheritance: objectViewDefinitionToBoolConverter

Implements: IValueConverter

Constructors

C#
public ViewDefinitionToBoolConverter()

Methods

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

C#
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

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

targetTypeType

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

parameterobject

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

cultureCultureInfo

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.

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

C#
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The value to convert back.

targetTypeType

The type to convert to.

parameterobject

Optional converter parameter.

cultureCultureInfo

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.