TextPointer.InsertParagraphBreak Method


Inserts a paragraph break at the current position.

 System::Windows::Documents::TextPointer ^ InsertParagraphBreak();
public System.Windows.Documents.TextPointer InsertParagraphBreak ();
member this.InsertParagraphBreak : unit -> System.Windows.Documents.TextPointer
Public Function InsertParagraphBreak () As TextPointer



A TextPointer to the beginning (ContentStart) of the new paragraph.


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.

Applies to