I have a sketch/designer type of program. The user can sketch shapes. These shapes are polygons in a user control. I have an edge and a vertex class which generate the point collection for my polygons and connect the vertices to outline the polygon.
I am using a selection box in an adorner to selection those controls and move them around. When I release the mouse after drawing the selection box, I run a hit test by calling VisualTreeHelper.HitTest. I pass in
where the rectangle is the selection box, and this chooses
the appropriate shapes.
The user can take the selected shapes and "join" them to unselected shapes. In this situation. The shapes still remain in separate user controls,
but they now share the common edges and vertices.
At this point, my selection stops working intermittently. When I try to debug my hit test, I never hit the break points in my HitTestFilterCallback, HitTestResultCallback, or in my overridden HitTestCore
functions. Then if I drag an edge or vertex, the selection may or may not start working again.
I am not even sure how to debug this type of problem anymore. I have checked the visual tree for the canvas holding my shape controls and everything seems right.
View Complete Post