InsertParagraphBreak Method

TextPointer.InsertParagraphBreak Method

Inserts a paragraph break at the current position.

Namespace:  System.Windows.Documents
Assembly:  PresentationFramework (in PresentationFramework.dll)

public TextPointer InsertParagraphBreak()

Return Value

Type: System.Windows.Documents.TextPointer
A TextPointer to the beginning (ContentStart) of the new paragraph.

ExceptionCondition
InvalidOperationException

This method is called on a position that cannot be split to accommodate a new paragraph, such as in the scope of a Hyperlink or InlineUIContainer.

If this method is called when the current position is inside of an existing Paragraph element, the existing paragraph and any content it contains are split into two paragraphs at the current position. If this method is called when the current position is not inside of an existing paragraph, a new, empty paragraph is inserted. If this method is called at a position unsuitable for splitting or inserting a paragraph (for example, if the current position is inside of a Hyperlink element), an exception is thrown.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2016 Microsoft