Windows apps
Collapse the table of content
Expand the table of content
Information
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.

TextElementCollection<TextElementType>.InsertBefore Method (TextElementType, TextElementType)

 

Inserts a specified item in the collection before a specified collection item.

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

public void InsertBefore(
	TextElementType nextSibling,
	TextElementType newItem
)

Parameters

nextSibling
Type: TextElementType

An item in the collection before which the new item will be inserted.

newItem
Type: TextElementType

An item to insert into the collection.

Exception Condition
ArgumentException

Raised when newItem already belongs to a collection.

ArgumentNullException

Raised when nextSibling or newItem is null.

InvalidOperationException

Raised when nextSibling does not belong to this collection.

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft