ClassViewDefinitionToBoolConverter
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:
public class ViewDefinitionToBoolConverter : IValueConverter
Inheritance: objectViewDefinitionToBoolConverter
Implements:
Constructors
ViewDefinitionToBoolConverter()
Declaration
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
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The ViewDefinitionBase instance to check. Expected to be of type ViewDefinitionBase.
targetType
The type of the binding target property. This parameter is not used.
parameter
Converter parameter containing comma-separated type names. Example: "DayViewDefinition,WeekViewDefinition"
culture
The culture to use in the converter. This parameter is not used.
Returns
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
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
value
The value to convert back.
targetType
The type to convert to.
parameter
Optional converter parameter.
culture
The culture to use in the converter.
Returns
Not implemented. Throws NotImplementedException.
Exceptions
This method is not implemented as two-way binding is not supported.