I have a Canvas based custom control that enables selection, dragging and resizing of visual children. 开发者_如何学GoI have so far Lines, Rectangles (without background) and images. Problem is, for selection, lines for example are hard to select obviously as they are 1 pixel high. Could you suggest a way to make them easily selectable? I'd like something along the lines of Visual Studio's selection, in which there are some pixels of "miss tolerance" when selecting something thin like a grid, you don't need to hit the exact pixel the line is at, few pixels around it are just as good, but I'm not sure how to implement that in WPF. Please help?
Thank you.
Perhaps what you are looking for can be easily achievable by using Adorner
精彩评论