Center of Diagram

Nov 19, 2013 at 7:51 PM
Hi,
How can I get the Center of Diagram?

Thanks.
Coordinator
Nov 20, 2013 at 8:18 AM
The center of the diagram sheet:
Point center = Point.Empty;
center.Offset(Diagram.Width / 2, Diagram.Height / 2);
The center of the diagram including all shapes (which may also reside outside the diagram sheet's boundaries):
Point center = Diagram.Shapes.GetBoundingRectangle(false);
All these coordinates are diagram coordinates. For conversion to control or screen coordinates, you can use
Display.DiagramToControl / Display.DiagramToScreen or
Display.ControlToDiagram / Display.ScreenToDiagram