How do I allow an event to reach other UI elements?

1

I have xaml that I apply a rectangle over several images, in order to be able to manipulate them after a holding in them. The problem is that if I put IsHitTestVisible in state false in the rectangle and when one of the images fires Holding , I update the status of IsHitTestVisible to true , rectangle in triggers events, such as ManipulationDelta , you need to remove your finger from the touchscreen and put it back to trigger the events in my rectangle.

What I have to do is similar to this SOen question , although there is no answer, they mention reflection techniques and the use of routed events , however it did not solve my problem because I did not know how to use it correctly or because it really was not the right solution. Could you give me an example of how to solve this problem?

    
asked by anonymous 01.07.2015 / 13:05

1 answer

0

After searching a lot, the solution was to use VisualTreeHelper.FindElementsInHostCoordinates . So I made the following: First we left the rectangle on the images active and added the Holding event to it, then I use FindElementsInHostCoordinates to find the images underneath it and trigger the Holding event to the correct "child" since I can get all the interface elements that are under my finger. I think this is the best way, but if anyone has a better one, please share it.

    
01.07.2015 / 20:02