alexa
menu

WPF

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

    Show / Hide Table of Contents

    Class HorizontalContentToTextAlignmentConverter

    Converts a horizontal content alignment value to a corresponding TextAlignment value.

    Inheritance
    System.Object
    HorizontalContentToTextAlignmentConverter
    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.Windows.Tools.Controls
    Assembly: Syncfusion.Shared.WPF.dll
    Syntax
    public class HorizontalContentToTextAlignmentConverter : IValueConverter

    Constructors

    HorizontalContentToTextAlignmentConverter()

    Declaration
    public HorizontalContentToTextAlignmentConverter()

    Methods

    Convert(Object, Type, Object, CultureInfo)

    Converts a horizontal content alignment value (as an integer) to a corresponding System.Windows.TextAlignment value.

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

    The value to convert, expected to be an integer representing alignment (0 = Left, 1 = Center, 2 = Right).

    System.Type targetType

    The target type of the binding (not used).

    System.Object parameter

    An optional parameter (not used).

    System.Globalization.CultureInfo culture

    The culture to use in the converter (not used).

    Returns
    Type Description
    System.Object

    A System.Windows.TextAlignment value corresponding to the input integer.

    ConvertBack(Object, Type, Object, CultureInfo)

    Converts a System.Windows.TextAlignment value back to a corresponding System.Windows.HorizontalAlignment value.

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

    The value to convert, expected to be a System.Windows.TextAlignment represented as an integer.

    System.Type targetType

    The target type of the binding (not used).

    System.Object parameter

    An optional parameter (not used).

    System.Globalization.CultureInfo culture

    The culture to use in the converter (not used).

    Returns
    Type Description
    System.Object

    A System.Windows.HorizontalAlignment value corresponding to the input integer.

    Implements

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