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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

WPF Diagram - zoomed in working area

Thread ID:





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

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?


Parthiban A [Syncfusion]
Replied On 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.


Parthiban A.


Marek Jankowski
Replied On November 27, 2012 10:33 AM UTC

Solved. Solution number 3 was what I wanted. 

Thank you for your assistance

Marek J.

Parthiban A [Syncfusion]
Replied On 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.


Parthiban A.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon