Gets the smallest possible text width that can fully contain the specified text content.
Assembly: PresentationCore (in PresentationCore.dll)
The following illustrated text uses the minimum text width for the source text, which displays as multiple lines. The minimum text width corresponds to the word that has the greatest width—in this case, the word "jumped". Notice that multiple words can appear on the same line, as long as their total width does not exceed the minimum text width.
If the value passed to MaxTextWidth is greater than or equal to the value of , the text is formatted without ellipsis characters.
The following example shows how to use the property to generate the minimum text width for the formatted lines of text.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.