I have a grid consisting of a rectangle and an overlapping image to it.
I want to have a click event for the rectangle to identify the selected tile and highlight it. It works fine with the tile without any image, but for the tile with an image over it, probably the image_click event is called.
Now, my question is how to identify the rectangle of the selected tile(with image). I have a class Block which has the rectangle and the piece object and the piece object has the image property.
Is it possible to display the image over rectangle but with click behaviour of rectangle over image?
If you don't need to have any hit testing on the image itself you can try..
image.IsHitTestVisible = false;
This will cause a problem if you need to capture events on the image as now it will be ignoring all mouse events.