Enlarge Stroke.hittest area
The hittest area on a stroke is tiny. Even if you make the stroke width larger, the hittest stays the same. My idea is when you draw a stroke, draw a thick polyline beneath it. The polyline can then act as the hittest area. But the problem is, when I move the polyline around with mousecapture, how I can signal the Stroke to move around to?
All I want is to signal the mousecoordinates to the stroke when I release the polyline from mousecapture so I can redraw 开发者_如何学编程the stroke at the coordinates.
I've tried inheriting the classes to add a new property, ID (so each stroke+polyline has the same id), but I cannot inherit because these are sealed classes.
Any ideas?
P.S. My ultimate goal is for the user to be able to move a Stroke around with the mouse one way or the other.
You could use the Polyline
s Tag
property by setting it with the matching Stroke
, and be careful that the tag is not used for anything else.
精彩评论