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

Change Node Position

Thread ID:

Created:

Updated:

Platform:

Replies:

97424 Nov 25,2010 11:29 AM Dec 1,2010 03:39 AM ASP.NET Web Forms (Classic) 3
loading
Tags: DiagramWebControl
Edward
Asked On November 25, 2010 11:29 AM

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


Pandi Murugan A [Syncfusion]
Replied On November 29, 2010 03:26 AM

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



Edward
Replied On November 30, 2010 10:03 AM

Thanks, it works as I expected


Pandi Murugan A [Syncfusion]
Replied On December 1, 2010 03:39 AM

Hi Edward,

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

Regards,
Pandi Murugan A


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

;