TreeNodeExtensionsMoveNodesUpDownT Method |
This procedure will move nodes some indices up or down. All nodes to move should have the same parent.
Namespace: Altaxo.CollectionsAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntaxpublic static int MoveNodesUpDown<T>(
int indexDelta,
IEnumerable<T> nodesToMove
)
where T : Object, ITreeListNodeWithParent<T>
Parameters
- indexDelta Int32
- Number of movement steps. Value less than zero will move up the nodes in the tree, values greater null will move down the nodes in the tree.
- nodesToMove IEnumerableT
- Nodes to move.
Type Parameters
- T
- The node type.
Return Value
Int32The number of indices the nodes were moved (either a positive number if the nodes where moved to higher indices, or negative if the nodes were moved to lower indices).
RemarksThe following assumptions must be fullfilled:
The nodes have to have the same parent, otherwise an exception is thrown.
See Also