2010-12-15 38 views
4

我们有一个运行在Win 7上的WPF应用程序。在Win 7中使用触摸手势时,滚动ListView时,应用程序在列表的末尾“耸耸肩”到达了。Windows 7触摸屏“耸耸肩”

这也可以在Internet Explorer中复制。如果您加载足够长的网页以生成滚动条,则Windows会在触摸手势滚动时到达页面底部时“耸耸肩”IE。

有没有办法在Windows中关闭耸肩或以某种方式使用我的WPF应用程序中的代码禁用它?我需要保持联系,关掉耸肩。

+0

另外我要补充,我认为它不仅会在应用程序是全屏。 – 2010-12-15 16:06:10

+1

这称为[“边界反馈”](http://msdn.microsoft.com/en-us/library/dd371416.aspx),您应该可以将其关闭以用于您自己的窗口。不确定系统范围。 – 2011-07-05 04:36:46

回答

4

手柄的ManipulationBoundaryFeedback(即e.Handled = true)。

3

如果要禁用窗口中所有控件的边界,则应该将ManipulationBoundaryFeedback控制柄放置在窗口的第一个面板上,而不是窗口本身上。

不起作用:

<Window x:Class="TestControls.BoundaryFeedback" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     ManipulationBoundaryFeedback="Control_ManipulationBoundaryFeedback" 
     > 
</Window> 

作品:

<Window x:Class="TestControls.BoundaryFeedback" 
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
     > 
    <Grid ManipulationBoundaryFeedback="Control_ManipulationBoundaryFeedback"> 
    </Grid> 
</Window> 

在后面的代码:

private void Control_ManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e) 
{ 
    e.Handled = true; 
} 
+1

太棒了!我长期以来一直在努力解决这个问题。真的不清楚在Window上处理这个是行不通的。 – Jens 2015-02-11 09:33:07