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

EnabledCentralPort to false by default

Thread ID:





97708 Dec 29,2010 11:48 AM UTC Jan 4,2011 08:40 AM UTC WinForms 3
Tags: Diagram
Blanca Calderon
Asked On December 29, 2010 11:48 AM UTC


is it possible by default, when you select LineTool, that the property EnabledCentralPort will ALWAYS be false?

Another question, I want the RectangleTool, always by default, draw a rectangle without color. It is a problem for me that the FillStyle in rectangle is yellow by default.

Thanks in advance for your help.

Bala Murugan A.S [Syncfusion]
Replied On December 30, 2010 08:55 AM UTC

Hi Blanca,

Thanks for using Syncfusion Products.

Diagram control has support to customize its Tools by deriving the appropriate Tool class. We suggest you to create your own Custom Tool and override its CreateNode method to customize the node inorder to achieve your requirements.

We have customize the LineTool and RectangleTool to meet your requirements, please refer the below code snippet.


class MyLineTool:LineTool
public MyLineTool(DiagramController controller): base(controller)
this.Name = "MyLineTool";
protected override Node CreateNode(PointF ptStart, PointF ptEnd)
LineBase toReturn = new Line(new PointF[] { ptStart, ptEnd });
toReturn.EditStyle.DefaultHandleEditMode = HandleEditMode.Vertex;

//Setting EnableCentralPort to false by default
toReturn.EnableCentralPort = false;

return toReturn;


class MyRectTool:RectangleTool
public MyRectTool(DiagramController controller)
: base(controller)
this.Name = "MyRectTool";
protected override Node CreateNode(RectangleF rectBounding)
Syncfusion.Windows.Forms.Diagram.Rectangle rect=new Syncfusion.Windows.Forms.Diagram.Rectangle(rectBounding);

//Drawing a rectangle without color by default
rect.FillStyle.Color = Color.Transparent;
return rect;

We have prepared a simple sample to demonstrate this and the same can be downloaded from the below link,

Please try the above sample and let me know if it helps.

Bala Murugan A.S

Blanca Calderon
Replied On January 3, 2011 10:24 AM UTC

Thanks, it works fine!

Bala Murugan A.S [Syncfusion]
Replied On January 4, 2011 08:40 AM UTC

Hi Blanca,

Thanks for the update.

Please let me know if you have any concerns and we will be happy to help you out.

Bala Murugan A.S


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

This page will automatically be redirected to the 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