-->

TextBlock over a listview: how to ignore clicks in

2019-06-27 16:25发布

问题:

I have a listview which displays a lot of info, but when it's empty I want to overlay a textblock over it which says "No Info to Display" or "Do bla-bla-bla to add info".

The listview is set up to respond to mouse clicks, but now if I click on the textblock, those events are routed to the textblock. How can I make these events go to the listview instead?

回答1:

IsHitTestVisible= "false" on the TextBlock.