The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
PMPandi Murugan A Syncfusion Team August 15, 2011 12:46 PM UTC
Hi JVM,
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. [C#] 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) { tool.Abort(); diagram1.Refresh(); } } }