/// <summary> /// Gets all children of a ShapeElement as a List /// </summary> /// <remarks>This is a wrapper for easy use of the FindFirstChild() and FindNextChild() methodes</remarks> /// <param name="shape">a ShapeElement</param> /// <returns>the children of the given ShapeElement</returns> public static IList <DiagramItem> Children(this ShapeElement shape) { List <DiagramItem> list = new List <DiagramItem>(); DiagramItem x = shape.FindFirstChild(false); while (x != null) { list.Add(x); x = shape.FindNextChild(x, false); } return(list); }