WPF

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BoolToObjectConverter

    Show / Hide Table of Contents

    Class BoolToObjectConverter

    This class converts a boolean value into an other object. Can be used to convert true/false to visibility, a couple of colors, couple of images, etc.

    Inheritance
    System.Object
    BoolToObjectConverter
    ObjectToBoolConverter
    Implements
    System.Windows.Data.IValueConverter
    Namespace: Syncfusion.Windows.Shared
    Assembly: Syncfusion.Shared.Wpf.dll
    Syntax
    public class BoolToObjectConverter : DependencyObject, IValueConverter

    Constructors

    BoolToObjectConverter()

    Declaration
    public BoolToObjectConverter()

    Fields

    CanConvertToTargetTypeProperty

    Declaration
    public static readonly DependencyProperty CanConvertToTargetTypeProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    FalseValueProperty

    Identifies the FalseValue property.

    Declaration
    public static readonly DependencyProperty FalseValueProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    TrueValueProperty

    Identifies the TrueValue property.

    Declaration
    public static readonly DependencyProperty TrueValueProperty
    Field Value
    Type Description
    System.Windows.DependencyProperty

    Properties

    CanConvertToTargetType

    Declaration
    public bool CanConvertToTargetType { get; set; }
    Property Value
    Type Description
    System.Boolean

    FalseValue

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

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

    TrueValue

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

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

    Methods

    Convert(Object, Type, Object, CultureInfo)

    Declaration
    public virtual 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 Description
    System.Object

    ConvertBack(Object, Type, Object, CultureInfo)

    Declaration
    public virtual 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 Description
    System.Object

    Implements

    System.Windows.Data.IValueConverter
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved