/// <summary> /// Moves this element up or down in the display order by repositioning the element in the collection. /// </summary> /// <param name="bUp"></param> protected override void Move(bool bUp) { TreeNodeViewModel parentNode = this.Parent; // find index and move element for (int i = 0; i < parentNode.InheritanceNodes.Count; ++i) { if (parentNode.InheritanceNodes[i].Id == this.Id) { if (bUp) { parentNode.MoveInheritanceNodes(i, i - 1); } else { parentNode.MoveInheritanceNodes(i, i + 1); } break; } } }