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

WPF Diagram - zoomed in working area

Hi, 
when I add some nodes onto diagram and I zoom in, the working area is limited to the size of most right- bottom node. I would like to have some kind of margin,see the attachment. I would like also to see this margin every time I move the node outside the working area (currently the scroll bar appears and working area has no margin)

I tried with that code:
double margin = 25;
this.UcDiagramView.Page.Height = this.UcDiagramView.Page.ActualHeight + margin;

I used it in zoom method, it adds the margin, but this margin does not increase the working area, node cannot be moved there.

Could you give me some hint how to solve my issue, please?


WorkingAreaProblem_a96ec933.zip

3 Replies

PA Parthiban A Syncfusion Team November 26, 2012 09:49 AM UTC

Hi Marek,


We have analyzed your query regarding “Margin for working area”. We can set margin for the diagram page by the following three methods are,


1. SizeToContent: It allows diagram page to have maximum area upto the bottom most and right most element in diagram page.


2. BoundaryConstarint: It allows diagram page to have defined boundary, it can be set through both code behind and dynamic. We should disable SizeToContent, while using BoundaryConstraints.


3. PageMargin :  This is to set margin for diagram page. Beyond that element couldn’t be moved.


We have created sample to meet your requirements, in which we have applied above three methods simultaneously through button to define working area. Please find the sample and video from attached file.


For more information please go to our online user guide documentation and the links are given below.


SizeToContent : http://help.syncfusion.com/User%20Interface/WPF/Diagram   à Concepts and Features à Diagram View àSizeToContent.


BoundaryConstarint: http://help.syncfusion.com/User%20Interface/WPF/Diagramà Concepts and Features à Diagram View àSizeToContent à Defining Diagram Page.


PageMargin: : http://help.syncfusion.com/User%20Interface/WPF/Diagramà Concepts and Features à Diagram View à PageMargin.


Please let us know if you require further assist on this.


Regards,

Parthiban A.



WorkingAreaMargin_77c9bc51.zip


MJ Marek Jankowski November 27, 2012 10:33 AM UTC

Solved. Solution number 3 was what I wanted. 

Thank you for your assistance

Regards,
Marek J.



PA Parthiban A Syncfusion Team November 27, 2012 10:39 AM UTC

Hi Marek,


Thanks for the reply. Please let us know if you have any other concerns. As always, we will be happy to assist you. Thanks for using Syncfusion Products.


Regards,


Parthiban A.


Loader.
Live Chat Icon For mobile
Up arrow icon