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
public ViewDefinitionToBoolConverter()
Methods
Converts a ViewDefinitionBase value to a boolean indicating whether its type name matches any of the expected type names.
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
The ViewDefinitionBase instance to check. Expected to be of type ViewDefinitionBase.
targetTypeTypeThe type of the binding target property. This parameter is not used.
parameterobjectConverter parameter containing comma-separated type names. Example: "DayViewDefinition,WeekViewDefinition"
cultureCultureInfoThe 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.
Converts a boolean value back to a ViewDefinitionBase. This method is not implemented.
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
The value to convert back.
targetTypeTypeThe type to convert to.
parameterobjectOptional converter parameter.
cultureCultureInfoThe culture to use in the converter.
Returns:Not implemented. Throws NotImplementedException.
Exceptions:This method is not implemented as two-way binding is not supported.