Change Node Position

Hi,

I create a node

RectangleF rectangule = new RectangleF(100, 100, 220, 200);
RichTextNode myGraphicNode = new RichTextNode("", rectangule);
dwfDiagram.Model.AppendChild(myGraphicNode);

But when the third line is executed, the position changes.

Anyway, I need to change the node position to a custom place through code

I've tried to change it like this

dwfDiagrama.Model.Nodes[4].BoundingRectangle.Location = pointXY;

but the BoundingRectangle property is read only

Thanks


3 Replies

PM Pandi Murugan A Syncfusion Team November 29, 2010 08:26 AM UTC

Hi Edward,

Thanks for using Syncfusion products.

The Diagram Node has a property called 'PinPoint' to position it on the diagram. We suggest you to use this property to positioning your nodes on the diagram. Please refer the below code snippet.

[C#]
RectangleF rect = new RectangleF(0, 0, 100, 100);
RichTextNode rtxNode = new RichTextNode("",rect);
rtxNode.Text = "My RichTextNode";
//Position the Node
rtxNode.PinPoint = new PointF(200, 200);
diagram1.Model.AppendChild(rtxNode);


Please let me know if you have any concerns.

Regards,
Pandi Murugan A




ED Edward November 30, 2010 03:03 PM UTC

Thanks, it works as I expected



PM Pandi Murugan A Syncfusion Team December 1, 2010 08:39 AM UTC

Hi Edward,

Thanks for your update. Please let me know if you have any concerns.

Regards,
Pandi Murugan A


Loader.
Up arrow icon