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

An IValueConverter that checks whether a value is of a given type or a subclass of it and returns a pre-defined value in accordance.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class IsOfTypeConverter : IValueConverter

Inheritance: objectIsOfTypeConverter

Implements: IValueConverter

Constructors

C#
public IsOfTypeConverter()

Properties

Gets or sets the value that is returned by the Convert() method when the incoming value is not of the provided Type.

C#
public object FalseValue { get; set; }

Gets or sets the value that is returned by the Convert() method when the incoming value is of the provided Type.

C#
public object TrueValue { get; set; }

Gets or sets the Type that is used to determine whether the incoming value is of this type or a subclass of it.

C#
public Type Type { get; set; }

Methods

Converts the incoming value to one of two pre-defined values (TrueValue or FalseValue) depending on whether the incoming value's type is of a given type or a subclass of it.

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

object

This method is not implemented and will throw a NotImplementedException.

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

object