menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EmptyObjectToObjectConverter - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    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
    EmptyCollectionToObjectConverter
    EmptyStringToObjectConverter
    Implements
    Microsoft.UI.Xaml.Data.IValueConverter
    Namespace: Syncfusion.UI.Xaml.Core
    Assembly: Syncfusion.Core.WinUI.dll
    Syntax
    public class EmptyObjectToObjectConverter : DependencyObject, IValueConverter

    Constructors

    EmptyObjectToObjectConverter()

    Declaration
    public EmptyObjectToObjectConverter()

    Fields

    EmptyValueProperty

    Identifies the EmptyValue property.

    Declaration
    public static readonly DependencyProperty EmptyValueProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    NotEmptyValueProperty

    Identifies the NotEmptyValue property.

    Declaration
    public static readonly DependencyProperty NotEmptyValueProperty
    Field 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.

    Implements

    Microsoft.UI.Xaml.Data.IValueConverter
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved