c# - Windows Phone xaml Grid Holding 事件未触发

标签 c# xaml events windows-phone-8.1

我有一个 ListView View ,其中 ItemTemplate 中有 Grid,我正在监听 Holding 事件,以便在用户持有 ListView 项目之一时显示一些弹出窗口:

 <DataTemplate x:Key="ItemListViewItemTemplate">
            <Grid 
                x:Name="ListViewItemBaseGrid" 
                Holding="OnChat_Holding">
             ......

但是这个事件不会时不时地触发,我的意思是 10 次中有 9 次它完美地工作但是有一段时间没有引发事件,因此我无法显示我想要显示的弹出窗口...

这个功能有更好的解决方案吗?

提前致谢

最佳答案

试试这个

<DataTemplate x:Key="ItemListViewItemTemplate">
    <Grid x:Name="ListViewItemBaseGrid"
          Background="Transparent"
          Holding="OnChat_Holding">

关于c# - Windows Phone xaml Grid Holding 事件未触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36333068/

相关文章:

c# - 文件.删除和目录.删除网络性能

c# - 从列表框中拖放项目时出现一些错误

c# - HierarchicalDataTemplate.Triggers 是否支持条件绑定(bind)到 ItemsSource 和 ItemTemplate?

javascript - 事件绑定(bind)和修改innerHTML

c# - 无法两次连接到同一个本地 TCP 服务器

c# - Web Api/ASP.NET Windows 身份验证如何工作?

c# - 将数据从代码隐藏到 XAML 的简单绑定(bind)

events - 如何删除多边形坐标/顶点/节点(Google Maps V3)

java - libgdx touchUp 事件

c# - ADO.net SqlTransaction 提高性能