FormattedText::MaxTextWidth Property

 

Gets or sets the maximum text width (length) for a line of text.

Namespace:   System.Windows.Media
Assembly:  PresentationCore (in PresentationCore.dll)

public:
property double MaxTextWidth {
	double get();
	void set(double value);
}

Property Value

Type: System::Double

The maximum text width for a line of text, provided in device-independent units (1/96th inch per unit).

Text will wrap to avoid exceeding the MaxTextWidth limit.

Glyph alignment edges must be kept within the line count limits. Because many fonts contain glyphs that slightly overhang their alignment edges, allow at least 1/6 em (font size) margin beyond the line count requested, to leave room for such overhangs.

A zero value for line count is treated as an infinite line count.

The following example creates a FormattedText object and then applies several formatting styles to the text, including MaxTextWidth.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: