LineBreak LineBreak LineBreak Class
Represents an inline element that causes a new line to begin in content when rendered in a text container.
public : sealed class LineBreak : Inline, ILineBreak
public sealed class LineBreak : Inline, ILineBreak
Public NotInheritable Class LineBreak Inherits Inline Implements ILineBreak
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
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.