internal static ConnectionPoint ConnectionPointHitTest(Point hitPoint, List <ConnectionPoint> connectionPoints, FreeFormPanel panel) { ConnectionPoint hitConnectionPoint = null; FreeFormPanel outmost = panel.GetOutmostPanel(); foreach (ConnectionPoint connPoint in connectionPoints) { if (connPoint != null && connPoint.IsEnabled) { if (new Rect(panel.TranslatePoint(connPoint.Location, outmost) + connPoint.HitTestOffset, connPoint.HitTestSize).Contains(hitPoint)) { hitConnectionPoint = connPoint; break; } } } return(hitConnectionPoint); }
internal static ConnectionPoint ConnectionPointHitTest(Point hitPoint, List<ConnectionPoint> connectionPoints, FreeFormPanel panel) { ConnectionPoint hitConnectionPoint = null; FreeFormPanel outmost = panel.GetOutmostPanel(); foreach (ConnectionPoint connPoint in connectionPoints) { if (connPoint != null && connPoint.IsEnabled) { if (new Rect(panel.TranslatePoint(connPoint.Location, outmost) + connPoint.HitTestOffset, connPoint.HitTestSize).Contains(hitPoint)) { hitConnectionPoint = connPoint; break; } } } return hitConnectionPoint; }