Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.85 KB

linebreak.md

File metadata and controls

33 lines (21 loc) · 1.85 KB
-api-id -api-type
T:Windows.UI.Xaml.Documents.LineBreak
winrt class

Windows.UI.Xaml.Documents.LineBreak

-description

Represents an inline element that causes a new line to begin in content when rendered in a text container.

-xaml-syntax

<LineBreak />

-remarks

LineBreak is most commonly used when formatting text within the TextBlock.Inlines collection. RichTextBlock supports the Paragraph element as an element that separately renders text blocks, so you don't typically need to use LineBreak content as often. (LineBreak is supported in the RichTextBlock text model, for example you can place a LineBreak in Paragraph.Inlines, between other Run or Span elements, and a line break will render at that position.)

LineBreak inherits properties from the TextElement class. However, most of these properties don't have any visible effect. It's most common to declare a LineBreak object element in XAML without there being any attributes set, similar to how you might use a <br/> tag in HTML.

Setting properties on LineBreak that otherwise affect the character line height of a text element (such as FontSize, FontFamily) has no effect on the text rendering and appearance. The height of a text line is inferred from the other text elements that precedes the LineBreak, and the properties of a LineBreak don't modify that line height even if set explicitly.

-examples

-see-also

Inline, TextElement, Run