Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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.

Exception Condition

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
Available since 3.0
Return to top
© 2016 Microsoft