diagram node sizing changes y location

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 ?

1 Reply

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

Loader.
Up arrow icon