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
Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.