public void SetChildIndex(DisplayObject child, int index) { int oldIndex = _children.IndexOf(child); if (oldIndex == -1) { throw new ArgumentException("child not found"); } _children.RemoveAt(oldIndex); _children.Insert(index, child); }