menu

WinUI

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

    Show / Hide Table of Contents

    Class DoubleToObjectConverter

    This class converts a double value into an other object. Can be used to convert doubles to visibility, a couple of colors, couple of images, etc. If GreaterThan and LessThan are both set, the logic looks for a value inbetween the two values. Otherwise the logic looks for the value to be GreaterThan or LessThan the specified value. The ConverterParameter can be used to invert the logic.

    Inheritance
    System.Object
    DoubleToObjectConverter
    DoubleToVisibilityConverter
    Implements
    Microsoft.UI.Xaml.Data.IValueConverter
    Namespace: Syncfusion.UI.Xaml.Core
    Assembly: Syncfusion.Core.WinUI.dll
    Syntax
    public class DoubleToObjectConverter : DependencyObject, IValueConverter

    Constructors

    DoubleToObjectConverter()

    Declaration
    public DoubleToObjectConverter()

    Fields

    FalseValueProperty

    Identifies the FalseValue property.

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

    GreaterThanProperty

    Identifies the GreaterThan property.

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

    LessThanProperty

    Identifies the LessThan property.

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

    NullValueProperty

    Identifies the NullValue property.

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

    TrueValueProperty

    Identifies the TrueValue property.

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

    Properties

    FalseValue

    Gets or sets the value to be returned when the expression is false

    Declaration
    public object FalseValue { get; set; }
    Property Value
    Type
    System.Object

    GreaterThan

    Gets or sets the value to check if the value is GreaterThan this value.

    Declaration
    public double GreaterThan { get; set; }
    Property Value
    Type
    System.Double

    LessThan

    Gets or sets the value to check if the value is LessThan this value.

    Declaration
    public double LessThan { get; set; }
    Property Value
    Type
    System.Double

    NullValue

    Gets or sets the value to be returned when the value passed is null

    Declaration
    public object NullValue { get; set; }
    Property Value
    Type
    System.Object

    TrueValue

    Gets or sets the value to be returned when the expression is true

    Declaration
    public object TrueValue { get; set; }
    Property Value
    Type
    System.Object

    Methods

    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)

    Convert back the value to a boolean

    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.

    Remarks

    If the value parameter is a reference type, TrueValue must match its reference to return true.

    Implements

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