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

Find if Point lies Inside a polygon

Thread ID:





100466 Aug 9,2011 09:35 AM UTC Aug 16,2011 03:37 AM UTC WinForms 1
Tags: Diagram
John Previn Kumar
Asked On August 9, 2011 09:35 AM UTC

Is there a way to find if a point (x,y) lies inside a polygon?

Pandi Murugan A [Syncfusion]
Replied On August 16, 2011 03:37 AM UTC


Thanks for using Syncfusion products.

We suggest you to use Node.Contains(PointF pt) method to achieve your requirement. Here is the code snippet for your reference.

diagram1.MouseUp += new MouseEventHandler(diagram1_MouseUp);
void diagram1_MouseUp(object sender, MouseEventArgs e)
PointF curPt = diagram1.Controller.ConvertToModelCoordinates(e.Location);
Node node = diagram1.Controller.GetNodeAtPoint(curPt);
if (node != null)
MessageBox.Show("Point inside!");

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

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