Class HorizontalContentToTextAlignmentConverter
Converts a horizontal content alignment value to a corresponding TextAlignment value.
Inheritance
Implements
Inherited Members
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. |