menu

WPF

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

    Show / Hide Table of Contents

    Class EnumToBooleanConverter

    Converter to handle boolean values based on enumeration values.

    Inheritance
    System.Object
    EnumToBooleanConverter
    Implements
    System.Windows.Data.IValueConverter
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.Diagram.Utility
    Assembly: Syncfusion.SfDiagram.WPF.dll
    Syntax
    public class EnumToBooleanConverter : IValueConverter

    Constructors

    EnumToBooleanConverter()

    Declaration
    public EnumToBooleanConverter()

    Methods

    Convert(Object, Type, Object, CultureInfo)

    To convert enumeration type values into boolean values.

    Declaration
    public object Convert(object value, Type targetType, object parameter, CultureInfo language)
    Parameters
    Type Name Description
    System.Object value

    Gets enumeration object value to convert boolean.

    System.Type targetType

    Gets target type.

    System.Object parameter

    Gets object parameter.

    System.Globalization.CultureInfo language

    Gets culture info value.

    Returns
    Type Description
    System.Object

    Returns true, when Display mode is expanded; Otherwise false.

    ConvertBack(Object, Type, Object, CultureInfo)

    To convert boolean values into enumeration type values.

    Declaration
    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo language)
    Parameters
    Type Name Description
    System.Object value

    Gets boolean value to cnvert enumeration type.

    System.Type targetType

    Gets target type value.

    System.Object parameter

    Gets object parameter.

    System.Globalization.CultureInfo language

    Gets culture info value.

    Returns
    Type Description
    System.Object

    Returns DisplayMode is expanded, when boolan is true; Otherwise returns display mode as Compact.

    Implements

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