-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Controls.RichTextBlockOverflow |
winrt class |
Represents a rich text display overflow container. This element cannot have direct content. The only purpose of RichTextBlockOverflow is to display text content that does not fit in the bounds of a RichTextBlock or another RichTextBlockOverflow element.
<RichTextBlockOverflow .../>
You can use a RichTextBlock with RichTextBlockOverflow elements to create advanced page layouts. The content for a RichTextBlockOverflow element always comes from a RichTextBlock element. You link RichTextBlockOverflow elements by setting them as the OverflowContentTarget of a RichTextBlock or another RichTextBlockOverflow.
Windows version | SDK version | Value added |
---|---|---|
1709 | 16299 | IsTextTrimmed |
1709 | 16299 | IsTextTrimmedChanged |
Here, a RichTextBlock targets a RichTextBlockOverflow element to create a multi-column text layout. The first RichTextBlockOverflow element then targets a second RichTextBlockOverflow element that receives its content overflow. The controlling layout factor for how the text overflow is calculated is the constrained Width and Height of the parent Grid, and the ColumnDefinition settings that divide the Grid into three equal columns of 300 pixels height/width. Overflow is also affected by FontSize and many other text formatting properties that change characters in the text.
[!code-xamlRichTextOverflow]
FrameworkElement, OverflowContentTarget, RichTextBlock, RichTextBock.OverflowContentTarget, XAML text display sample