New to Telerik UI for WPFStart a free 30-day trial

Converts a string value to a boolean indicating whether the string is empty or not.

Definition

Namespace:Telerik.Windows.Documents.Utils

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

C#
public class IsStringEmptyToBoolConverter : IValueConverter

Inheritance: objectIsStringEmptyToBoolConverter

Implements: IValueConverter

Constructors

C#
public IsStringEmptyToBoolConverter()

Methods

Converts the specified value to a boolean indicating whether the string is empty.

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

The value to convert, which should be a string or null.

targetTypeType

The type of the target property.

parameterobject

An optional parameter that can be used to influence the conversion.

cultureCultureInfo

The culture to use in the conversion process.

Returns:

object

True if the string is null or empty; otherwise, false.

Converts a value from a string representation to a boolean value.

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

The object to convert back to a boolean. This should be a string.

targetTypeType

The type to convert the value to, typically a boolean type.

parameterobject

An optional parameter that can modify the conversion logic.

cultureCultureInfo

The culture information that may be used in the conversion process.

Returns:

object

A boolean value indicating whether the string representation is empty or not.