Name
HorizontalAlignment
Synopsis
This enumeration is used by most of the Control
classes to specify how particular parts of their imagery should be
positioned (e.g., the TextBox.TextAlign property).
Note that this enumeration uses Left,
Center, and Right rather than
the usual Near, Center, and
Far, but the Control objects
still honor the setting for Control.RightToLeft.
So, if you set Left, but also
RightToLeft.Yes, the element will actually be
aligned to the right.
public enum HorizontalAlignment { Left = 0, Right = 1, Center = 2 }
Hierarchy
System.Object
→ System.ValueType → System.Enum(System.IComparabl,
System.IFormattable,
System.IConvertible)
→ HorizontalAlignment
Returned By
ColumnHeader.TextAlign,
Control.{RtlTranslateAlignment(),
RtlTranslateHorizontal()},
DataGridColumnStyle.Alignment,
RichTextBox.SelectionAlignment,
StatusBarPanel.Alignment,
TextBox.TextAlign,
UpDownBase.TextAlign
Passed To
ColumnHeader.TextAlign,
Control.{RtlTranslateAlignment(),
RtlTranslateHorizontal()},
DataGridColumnStyle.Alignment,
ColumnHeaderCollection.{Add(), Insert()}, RichTextBox.SelectionAlignment,
StatusBarPanel.Alignment,
TextBox.TextAlign,
UpDownBase.TextAlign
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access