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.
Unfortunately, activation email could not send to your email. Please try again.

WPF Diagram - zoomed in working area

Thread ID:

Created:

Updated:

Platform:

Replies:

105836 Nov 22,2012 05:31 AM Nov 27,2012 05:39 AM WPF 3
loading
Tags: Diagram
Marek Jankowski
Asked On November 22, 2012 05:31 AM

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

Parthiban A [Syncfusion]
Replied On November 26, 2012 04:49 AM

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

Marek Jankowski
Replied On November 27, 2012 05:33 AM

Solved. Solution number 3 was what I wanted. 

Thank you for your assistance

Regards,
Marek J.


Parthiban A [Syncfusion]
Replied On November 27, 2012 05:39 AM

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.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;