How to change size of the design surface ?

Feb 18, 2012 at 10:15 AM
Edited Feb 18, 2012 at 11:35 AM

Hi all,

Is there any way to change the size of the design surface? (A4, A2...)

Developer
May 26, 2013 at 5:39 AM
Edited May 26, 2013 at 6:49 AM
Hi

You can do it with SetSize method and Geometry enumerator class ;)
diagram1.Model.SetSize(Geometry.GetPaperSize(DiagramUnit.Pixel, Crainiate.Diagramming.Printing.PaperSizes.Iso.A4));
diagram1.Paging.PageSize = Geometry.GetPaperSize(DiagramUnit.Pixel, Crainiate.Diagramming.Printing.PaperSizes.Iso.A4);
Best Regards.
Developer
Oct 14, 2015 at 8:22 AM
You can also set it to fill the size of the control if creating large diagrams not designed for printing
// no page size
diagram1.Paging.Enabled = false;
// fill to use all available space
diagram1.Dock = DockStyle.Fill
// force it to move elements to any location in the diagram
diagram1.Controller.CheckBounds = false;