How to reproduce: add a MapCallout to a layer and then try to hit test it in the MouseDown event of the control. The element is not always returned even though it contains the mouse location:
private void RadMap1_MouseDown(object sender, MouseEventArgs e)
public class MyMapCallout : MapCallout{ public MyMapCallout(PointG location) : base(location) { } public MyMapCallout(MapVisualElement element) : base(element) { } public override bool HitTest(PointG pointG, PointL pointL, IMapViewport viewport) { bool isInsideFigure = false; using (GraphicsPath newPath = new GraphicsPath(this.path.PathPoints, this.path.PathTypes)) using (Matrix translateMatrix = new Matrix()) { translateMatrix.Translate(this.drawRect.X, this.drawRect.Y); newPath.Transform(translateMatrix); isInsideFigure = newPath.IsVisible(pointL.X, pointL.Y); } return isInsideFigure; }}