TextBlock在listview中:如何忽略TextBlock中的点击并让listview处理它们 [英] TextBlock over a listview: how to ignore clicks in the TextBlock and let the listview handle them

查看:138
本文介绍了TextBlock在listview中:如何忽略TextBlock中的点击并让listview处理它们的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个列表视图显示了很多信息,但是当它是空的时候,我想覆盖一个文本框,其中显示无信息显示或添加信息。

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?

推荐答案

IsHitTestVisible =在TextBlock上的false

这篇关于TextBlock在listview中:如何忽略TextBlock中的点击并让listview处理它们的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆