I am working on a custom control which draws curves on it and allows user to change the properties of the curve by clicking on it. Now capturing the events on the curves itself is very difficult as they might be very thin (as per the user requirement)
Somehow I want to increase the hit selection are for the curves.
I have a solution for it but it is really expensive as I have huge number of curves in my chart. Thatz why I am searching for a logic by which I can find limited curves around mouse pointer.
I tried HitTest() but it does not help.
I googled a lot for the solution but no gain.
If somebody can spotsome light on this topic and suggest me a correct direction to proceed then that will be a great help.
Thanks in advance.
You’ll have to implement this functionality yourself. What you could do is listen to MouseEnter/MouseLeave of the underlying line and if you get a mousedown within a certain radius of the initial MouseEnter/Leave count this as a hit.
For instance, in pseudo code: