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

Converts null or empty values to boolean values.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class NullOrEmptyToBoolConverter : IValueConverter

Inheritance: objectNullOrEmptyToBoolConverter

Implements: IValueConverter

Constructors

C#
public NullOrEmptyToBoolConverter()

Methods

Converts a value to a boolean indicating whether it is null or empty.

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

The value to convert.

targetTypeType

The target type for the conversion.

parameterobject

An optional parameter for the conversion.

cultureCultureInfo

The culture to use for the conversion.

Returns:

object

true if the value is not null or empty; otherwise, false.

Converts back from a boolean to the original value type.

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

The value to convert back.

targetTypeType

The target type for the conversion.

parameterobject

An optional parameter for the conversion.

cultureCultureInfo

The culture to use for the conversion.

Returns:

object

This method is not implemented.

Exceptions:

NotImplementedException

Always thrown as this method is not implemented.