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.
Syncfusion Feedback

Dynamic logical re sizing when diagram size exceeds

Thread ID:

Created:

Updated:

Platform:

Replies:

114170 Nov 1,2013 07:41 AM UTC Nov 6,2013 11:16 AM UTC Windows Forms 1
loading
Tags: Diagram
Muneeb Ahmed
Asked On November 1, 2013 07:41 AM UTC

I am showing an organization hierarchy using diagram. The problem i am facing is that when i hierarchy size increases it the diagram doesn't show completely. I know that changing logical size of model will adjust this but when small hierarchy comes then a lot of spaces is empty in diagram . 
So i want that the logical size of model is adjusted based on the heirarchy  size which is generated from database. 

Ashok Kumar V [Syncfusion]
Replied On November 6, 2013 11:16 AM UTC

Hi Muneeb Ahmed,

Thanks for your interest in Syncfusion product,

We suggest you to set diagram.Model’s “SizeToContent” to true and diagram.Model’s “BoundaryConstraintsEnabled” to false in order to achieve your requirement. Please refer the below code snippet for your reference:

[C#]

private void Form1_Load(object sender, EventArgs e)

 {

    this.diagram1.Model.BoundaryConstraintsEnabled = false;

    //Model will be resized to its content

    this.diagram1.Model.SizeToContent = true;

    diagram1.LoadBinary(@"../../Flow.edd");

 }

 

Please try the below attached sample and let us know if you have any queries.

Regards,

Ashok Kumar

 



Forum_114170_d5c3bb5b.zip

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.

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

;