TextBlock over a listview: how to ignore clicks in the TextBlock and let the listview handle them

主宰稳场 提交于 2019-12-10 15:45:15

问题


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.



来源:https://stackoverflow.com/questions/6417201/textblock-over-a-listview-how-to-ignore-clicks-in-the-textblock-and-let-the-lis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!