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.

Turning off selection rectangle

Thread ID:





101632 Nov 9,2011 12:28 PM Nov 14,2011 02:24 AM Windows Forms 2
Tags: Diagram
Johnathan Tunnicliffe
Asked On November 9, 2011 12:28 PM


I was wondering if it's possible to turn off the selection rectangle (the rectangle that is drawn from the mouse as you drag on the canvas). See the image attached for what i mean.

Obviously when using the pan tool etc the rectangle isn't drawn when you drag on the canvas. Is there anyway to replicate this?



Johnathan Tunnicliffe
Replied On November 9, 2011 02:38 PM

To answer my own question it looks like I can override SelectTool and override the Draw method and set that as my active tool on the controller of my diagram.

Amsath Ali M [Syncfusion]
Replied On November 14, 2011 02:24 AM

Hi Johnathan,

Thanks for your interest in Syncfusion products.

We suggest you to Set the SelectTool.TrackingStyle’s ‘LineColor’ property to ‘Transparent’ to hide the selection rectangle while dragging through the mouse. Please refer the below code snippet to achieve your requirement.

Here is the code snippet:
void diagram1_MouseDown(object sender, MouseEventArgs e)
if (diagram1.Controller.ActiveTool.Name == "SelectTool")
((SelectTool)diagram1.Controller.ActiveTool).TrackingStyle.LineColor = Color.Transparent;

Here is the sample:
Forum SelectToolColor Change266915234.zip

Please try the above sample and let us know if you have any queries.

Amsath Ali. M


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.

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.