Good afternoon. Not working AutoFit(). After loading the diagram, should be AutoFit, but the screen always goes in the center of the diagram. I have tried the following combinations:
1) like in this post http://www.telerik.com/forums/autofit-to-fill-whole-space-of-the-host-window
this.diagram.AutoFit(new Thickness(5), true);
it didn't help and I tried:
2) Rect allShapesBounds = this.diagram.Shapes.GetEnclosingBounds();
Rect inflatedRect = allShapesBounds.InflateRect(10, 10, 10, 10);
this.diagram.FitTo(inflatedRect);
and it did not help too and I tried so:
3) Rect allShapesBounds = this.diagram.Shapes.GetEnclosingBounds();
Rect inflatedRect = allShapesBounds.InflateRect(10, 10, 10, 10); this.diagram.BringIntoView(inflatedRect);