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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changing the polyline default name

Thread ID:





67602 Aug 24,2007 01:35 PM UTC Aug 24,2007 07:55 PM UTC WinForms 1
Tags: Diagram
Elia Chkayra
Asked On August 24, 2007 01:35 PM UTC

I have an application in wich i must give each node drawed in the diagram a default name.
When using the polyline tool, and when drawing is finnished, it gives to the node the default name PolylineNode, and then polylineNode1 and so on..
I want to be able to change this fact and give the drawed node a default name : Room1, then Room2 and so on?
how can this be done, and wich methods i have to use.. thanks a lot .

Ajish [Syncfusion]
Replied On August 24, 2007 07:55 PM UTC

Hi Elia,

Thank you for your interest in syncfusion products.

You can change the polyline default name is can be done by overiding the PolyLineBase Class CreateNode(). Here is the code for doing it,

static int i = 0;
protected override Node CreateNode( PointF[] pts )
LineBase toReturn = new PolylineNode( pts );
SetDecorator( toReturn );
toReturn.Name = "Room" + i.ToString();

return toReturn;

Here is the sample link for your refference,

Sample: http://websamples.syncfusion.com/samples/Diagram.Windows/F67602/main.htm

Kindly take a look and let me know if you need further assistance.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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