LineBreak LineBreak LineBreak Class

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

Syntax

Declaration

public sealed class LineBreakpublic sealed class LineBreakPublic NotInheritable Class LineBreak
<LineBreak />

Inheritance Hierarchy

Inherited Members

Inherited properties

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited events

, ,

Inherited methods

, , , , , , , ,

Remarks

LineBreak is most commonly used when formatting text within the 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 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.

Constructors summary

Initializes a new instance of the LineBreak class.

Constructors

  • LineBreak()
    LineBreak()
    LineBreak()
    LineBreak()

    Initializes a new instance of the LineBreak class.

    public LineBreak()public New()Public Sub New()public LineBreak()

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Documents.dll