I have a some grids with a overlay canvas on top. The canvas is transparent and I can only handle mouse events on this canvas.
The problem is that I want to handle mouseDownEvents on the appropriate Grid object instead of the canvas.
I have experimented with routed events and tried to route events deeper in the WPF tree by handling events at the grid that are already handled by the ca开发者_Python百科nvas: grid.AddHandler(Grid.MouseDownEvent, new MouseButtonEventHandler(EducationMouseDown), true);
I also tried to set the Handled property of the eventArgs to false in the handler of the canvas.
Unfortunately, non of these attemps worked.
Try to set IsHitTestVisible="false"
on your overlay canvas.
精彩评论