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

Dynamic logical re sizing when diagram size exceeds

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. 

1 Reply

AK Ashok Kumar V Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon