I'm using adorner to draw line on canvas which works but the issue I'm facing is that it is not clickable so I have to keep clicking ten times to select it using mouse. Is there any property setting that I have missed here?
thanks. amit
I'm using adorner to draw line on canvas which works but the issue I'm facing is that it is not clickable so I have to keep clicking ten times to select it using mouse. Is there any property setting that I have missed here?
thanks. amit
If you use the pixels (default hittest) to determine whether or not the user clicked a line, the user has to click the line exactly. When a line is very thin this is very hard.
Another way of handling this is by calculation. When the users clicks calculate the distance between the mouse location and the lines and select the line that is closest.
You could even make an ordered list of the lines that are within a specified radius and select the next line from this list when the user clicks again.