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

Restricting tool activity

Thread ID:





100440 Aug 8,2011 06:50 AM UTC Aug 15,2011 12:46 PM UTC WinForms 1
Tags: Diagram
John Previn Kumar
Asked On August 8, 2011 06:50 AM UTC

Can we make a tool inactive in certain place of the diagram? I need to be able to draw circles on upper left corner of the diagram control. for eg) If diagram control is 100X100 pixels size, I need to restrict drawing of circles only on top left 50X50 pixels.

Pandi Murugan A [Syncfusion]
Replied On August 15, 2011 12:46 PM UTC


Thanks for using Syncfusion products and sorry for the delay in getting back to you.

You can achieve your requirement by aborting the drawing tool. Here is the code snippet for your reference.

diagram1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.diagram1_MouseMove);
private void diagram1_MouseMove(object sender, MouseEventArgs e)
EllipseTool tool = diagram1.Controller.ActiveTool as EllipseTool;
if (tool != null)
PointF curPt = diagram1.Controller.ConvertToModelCoordinates(e.Location);
if (curPt.X > 50 || curPt.Y > 50)

Please let me know if you have any concerns.

Pandi Murugan A


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