Click or drag to resize
CanvasTextLayoutLayoutBoundsIncludingTrailingWhitespace Property
Gets a rectangle describing the bounds of text, plus any trailing whitespace.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public Rect LayoutBoundsIncludingTrailingWhitespace { get; }

Property Value

Type: Rect
Remarks

The bounds are relative to the text's layout box. These bounds are in DIPs, and do not take into account any transforms that might be applied while rendering the text.

The location of trailing whitespace is as follows:

Text directionLocation of trailing whitespace
LeftToRightThenTopToBottomAt the right
RightToLeftThenTopToBottomAt the left
LeftToRightThenBottomToTopAt the right
RightToLeftThenBottomToTopAt the left
TopToBottomThenLeftToRightAt the bottom
BottomToTopThenLeftToRightAt the top
TopToBottomThenRightToLeftAt the bottom
BottomToTopThenRightToLeftAt the top

Word wrapping isn't affected by trailing whitespace. To obtain the bounds against which Win2D word-wraps, use LayoutBounds.

See Also