WPF,用ScrollViewer控件,触屏开发,当滑动到最后时会使整个窗体弹跳一下

原因是因为ScrollViewer触屏操作原生支持惯性,ScrollViewer中的内容滚动到边界是会自动触发Window Bounce(窗体弹跳),

以叫做Panning Feedback(拖动回馈)。

欲取消这种效果,办法如下:

1. 转给ScrollViewer注册ManipulationBoundaryFeedback事件

2. 在事件中书写:e.Handled = true;即可。

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

相关文章:

  • 2022-12-23
  • 2021-12-04
  • 2021-09-15
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2021-06-26
  • 2021-10-30
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-12-03
  • 2021-11-02
相关资源
相似解决方案