Specifies the display and layout information for text strings.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Aligns the text on the bottom of the bounding rectangle. Applied only when the text is a single line.
Applies the default formatting, which is left-aligned.
Removes the end of trimmed lines, and replaces them with an ellipsis.
Expands tab characters. The default number of characters per tab is eight. The, , and values cannot be used with .
Includes the font external leading in line height. Typically, external leading is not included in the height of a line of text.
Adds padding to the bounding rectangle to accommodate overhanging glyphs.
Applies to Windows 2000 and Windows XP only:
Centers the text horizontally within the bounding rectangle.
Uses the system font to calculate text metrics.
Aligns the text on the left side of the clipping area.
Adds padding to both sides of the bounding rectangle.
Has no effect on the drawn text.
Allows the overhanging parts of glyphs and unwrapped text reaching outside the formatting rectangle to show.
Applies to Windows 98, Windows Me, Windows 2000, or Windows XP only:
Does not add padding to the bounding rectangle.
Turns off processing of prefix characters. Typically, the ampersand (&) mnemonic-prefix character is interpreted as a directive to underscore the character that follows, and the double-ampersand (&&) mnemonic-prefix characters as a directive to print a single ampersand. By specifying, this processing is turned off. For example, an input string of "A&bc&&d" with applied would result in output of "A&bc&&d".
Removes the center of trimmed lines and replaces it with an ellipsis.
Applies to Windows 2000 or Windows XP only:
Aligns the text on the right side of the clipping area.
Displays the text from right to left.
Displays the text in a single line.
Specifies the text should be formatted for display on a TextBox control.
Aligns the text on the top of the bounding rectangle.
Centers the text vertically, within the bounding rectangle.
Breaks the text at the end of a word.
Trims the line to the nearest word and an ellipsis is placed at the end of a trimmed line.
Legacy Code Example
Available since 2.0