I have a “Chart” with two panels (System.Windows.Controls.Panel). One panel is the “RowsPresenter” and handles laying out the rows, which in turn handle laying out the items (multiple items per row).
Another panel is the “LinesPresenter” and handles drawing lines between different items, and these lines generally cross multiple rows.
These two panels have the same dimensions and location.
I have the ability to drag an item within its containing row. This is handled by tracking MouseDown, MouseUp, MouseMove, etc events (on the row, not the individual item). However, when I’m dragging an item and the mouse cursor touches one of these lines the MouseLeave event fires on the Row. This MouseLeave event essentially stops the drag operation. If I don’t attach this event then other usage scenarios break.
Is there a simple way to solve this issue without redesigning the entire dragging system by using something like CaptureMouse?
Set the
LinesPresenterIsHitTestVisibleproperty to false. That should fix it.