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
System.Object
EmptyObjectToObjectConverter
Implements
System.Windows.Data.IValueConverter
Namespace: Syncfusion.Windows.Shared
Assembly: Syncfusion.Shared.Wpf.dll
Syntax
public class EmptyObjectToObjectConverter : DependencyObject, IValueConverter
Constructors
EmptyObjectToObjectConverter()
Declaration
public EmptyObjectToObjectConverter()
Fields
CanConvertToTargetTypeProperty
Declaration
public static readonly DependencyProperty CanConvertToTargetTypeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
EmptyValueProperty
Identifies the EmptyValue property.
Declaration
public static readonly DependencyProperty EmptyValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
NotEmptyValueProperty
Identifies the NotEmptyValue property.
Declaration
public static readonly DependencyProperty NotEmptyValueProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
CanConvertToTargetType
Declaration
public bool CanConvertToTargetType { get; set; }
Property Value
Type |
---|
System.Boolean |
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, CultureInfo)
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.Type | targetType | |
System.Object | parameter | |
System.Globalization.CultureInfo | culture |
Returns
Type |
---|
System.Object |
ConvertBack(Object, Type, Object, CultureInfo)
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Object | value | |
System.Type | targetType | |
System.Object | parameter | |
System.Globalization.CultureInfo | culture |
Returns
Type |
---|
System.Object |
Implements
System.Windows.Data.IValueConverter