We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Fit to page

Is there any mechanism that allow me to fit the contents (nodes/connectors etc) to the size of the page?

4 Replies

NA Nikhil A Syncfusion Team October 28, 2009 09:25 AM UTC

Hi Svein,

We suppose you are pointing to some mechanism in which the page fits to the size of the nodes and the connectors. We would like you to know that the DiagramPage , which hosts the objects , always resizes itself to the extent of its objects. Therefore at any point in time, the page size will be just big enough so that all its contents fit properly. By default the page is transparent. However the page can be applied a background using the following syntax:

(diagramView.Page as DiagramPage).Background=Brushes.Gray;

where diagramView refers to the DiagramView instance.

Please let us know if there are any concerns.

Regards,
Nikhil
Syncfusion WPF Team


EH ehor January 21, 2011 01:20 AM UTC

hi, i also scratching my head on how to implement fit-to-screen
capability.

I want to achieve that when the user click to a button, the diagram can resize all the components(nodes/connections etc) so that all the components can be display on the viewable screen size/diagramview.





EH ehor January 24, 2011 04:44 PM UTC

Hi expert, is there any fit-to-screen API in WPF Essential Diagram?



SM Sundar M Syncfusion Team January 28, 2011 05:55 AM UTC

Hi ehor,

Currently API for fit to screen is not available, but the required behavior can be achieved. In this sample, we have implemented FitToScreen using DiagramView’s Zooming functionality. Please click on Button labeled ‘FitToScreen’ from the following sample.

Sample Link:

Please let us know if you have any queries.

Regards,
Sundar M.



FitToScreen_2dd888d4.zip

Loader.
Live Chat Icon For mobile
Up arrow icon