Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InsertAfter Method

TextElementCollection.InsertAfter Method

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

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

public void InsertAfter (
	TextElementType previousSibling,
	TextElementType newItem
)
public void InsertAfter (
	TextElementType previousSibling, 
	TextElementType newItem
)
public function InsertAfter (
	previousSibling : TextElementType, 
	newItem : TextElementType
)
You cannot use methods in XAML.

Parameters

previousSibling

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

newItem

An item to insert into the collection.

Exception typeCondition

ArgumentException

Raised when newItem already belongs to a collection.

ArgumentNullException

Raised when previousSibling or newItem is null.

InvalidOperationException

Raised when previousSibling does not belong to this collection.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft