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

diagram node sizing changes y location

Thread ID:

Created:

Updated:

Platform:

Replies:

114057 Oct 25,2013 10:08 AM UTC Oct 31,2013 09:15 AM UTC WinForms 1
loading
Tags: Diagram
Olaf Mohr
Asked On October 25, 2013 10:08 AM UTC

Hello,

i added a rectangular node to my diagram and just want to change the node.height property to the new
value NewHeight.

CurrentNode.Size = New SizeF(CurrentNode.Size.Width, NewHeight)

That works fine, but changing the height also changes the y coordinate of the node.

How can i avoid that ?

Ashok Kumar V [Syncfusion]
Replied On October 31, 2013 09:15 AM UTC

Hi Olaf mohr,

Thanks for using Syncfusion products,

We suggest you to set Node.EditStyle’s “ AllowMoveY”  property to false to achieve your requirement . Please refer the below code snippet for your reference.

Here is the code:

[C#]

private void Form1_Load(object sender, EventArgs e)

  {

   Syncfusion.Windows.Forms.Diagram.Rectangle rect = new  Syncfusion.Windows.Forms.Diagram.Rectangle(100, 200, 100, 70);

   // Disable movement along Y axis

   rect.EditStyle.AllowMoveY = false;

   diagram1.Model.AppendChild(rect);

  }

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

Regards,

Ashok Kumar.

 



114057_59f1442d.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

;