Diese Dokumentation wurde archiviert und wird nicht länger gepflegt.

ContextNode.MoveSubNodeToPosition-Methode

Reorders a specified child ContextNode object so that it moves to the specified index.

Namespace: System.Windows.Ink
Assembly: IAWinFX (in iawinfx.dll)

public void MoveSubNodeToPosition (
	ContextNode subNodeToMove,
	int newIndex
)
public void MoveSubNodeToPosition (
	ContextNode subNodeToMove, 
	int newIndex
)
public function MoveSubNodeToPosition (
	subNodeToMove : ContextNode, 
	newIndex : int
)
Nicht zutreffend.

Parameter

subNodeToMove

The child ContextNode object to be reordered.

newIndex

The new position of the nodeToMoveContextNode object.

An ArgumentException is thrown if nodeToMove is not a child of the ContextNode object.

The following example moves an InkWordNode, wordToMove, from its current index in a line to one index earlier. This code could be part of a text correction user interface where the user indicates that a selected word should have been placed one word earlier.

ContextNode parentNode = wordToMove.ParentNode;
int wordIndex = parentNode.SubNodes.IndexOf(wordToMove);
int newIndex = Math.Max(0, wordIndex - 1);
parentNode.MoveSubNodeToPosition(wordToMove, newIndex);

Windows XP Media Center Edition

Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0
Anzeigen: