Class EmptyObjectToObjectConverter
This class converts an object value into a an object (if the value is null returns the false value). Can be used to bind a visibility, a color or an image to the value of an object.
Inheritance
Implements
Namespace: Syncfusion.UI.Xaml.Core
Assembly: Syncfusion.Core.WinUI.dll
Syntax
public class EmptyObjectToObjectConverter : DependencyObject, IValueConverterConstructors
EmptyObjectToObjectConverter()
Declaration
public EmptyObjectToObjectConverter()Fields
EmptyValueProperty
Identifies the EmptyValue property.
Declaration
public static readonly DependencyProperty EmptyValuePropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
NotEmptyValueProperty
Identifies the NotEmptyValue property.
Declaration
public static readonly DependencyProperty NotEmptyValuePropertyField Value
| Type | 
|---|
| Microsoft.UI.Xaml.DependencyProperty | 
Properties
EmptyValue
Gets or sets the value to be returned when the object is either null or empty
Declaration
public object EmptyValue { get; set; }Property Value
| Type | 
|---|
| System.Object | 
NotEmptyValue
Gets or sets the value to be returned when the object is neither null nor empty
Declaration
public object NotEmptyValue { get; set; }Property Value
| Type | 
|---|
| System.Object | 
Methods
CheckValueIsEmpty(Object)
Checks value for emptiness.
Declaration
protected virtual bool CheckValueIsEmpty(object value)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | Value to be checked. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | True if value is null, false otherwise. | 
Convert(Object, Type, Object, String)
Convert a boolean value to an other object.
Declaration
public object Convert(object value, Type targetType, object parameter, string language)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | The source data being passed to the target. | 
| System.Type | targetType | The type of the target property, as a type reference. | 
| System.Object | parameter | An optional parameter to be used to invert the converter logic. | 
| System.String | language | The language of the conversion. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The value to be passed to the target dependency property. | 
ConvertBack(Object, Type, Object, String)
Not implemented
Declaration
public object ConvertBack(object value, Type targetType, object parameter, string language)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | value | The target data being passed to the source. | 
| System.Type | targetType | The type of the target property, as a type reference (System.Type for Microsoft .NET, a TypeName helper struct for Visual C++ component extensions (C++/CX)). | 
| System.Object | parameter | An optional parameter to be used to invert the converter logic. | 
| System.String | language | The language of the conversion. | 
Returns
| Type | Description | 
|---|---|
| System.Object | The value to be passed to the source object. |