[英]Wpf touch events not working in windows 8.1
I have a wpf desktop application. 我有一个wpf桌面应用程序。 On windows 7 all touch events are working fine, but when I switch to windows 8.1, touch events don't work.
在Windows 7上,所有触摸事件都可以正常工作,但是当我切换到Windows 8.1时,触摸事件不起作用。 Anybody knows why?
有人知道为什么吗?
Edit 编辑
Here is my xaml code: 这是我的xaml代码:
<Button Content="{Binding DisplayName}" Style="{StaticResource WindowButtonStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="TouchUp">
<ei:CallMethodAction TargetObject="{Binding}" MethodName="OnTouchUpMenuButtons"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
and method in the viewModel: 和viewModel中的方法:
public void OnTouchUpMenuButtons(object sender, TouchEventArgs e)
{
// code
}
我已经将TouchUp事件切换为PreviewMouseDown事件,并且可以正常工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.