Uredi

Deli z drugimi prek


TextPointer.InsertParagraphBreak Method

Definition

Inserts a paragraph break at the current position.

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

Returns

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

Exceptions

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.

Remarks

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