WPF ScroolViewer触摸屏滚动实现,禁止窗口弹跳

版权声明:欢迎转载,转载请附上链接 https://blog.csdn.net/chenbeifang/article/details/89511434

设置属性  在ScrollViewer的xaml代码那里加上 PanningMode=“Both”

xaml代码中添加事件

ManipulationBoundaryFeedback="ScrollViewerManipulationBoundaryFeedback"

窗口后台代码中实现事件ManipulationBoundaryFeedback

private void ScrollViewerManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)

{

e.Handled = true; //

}

猜你喜欢

转载自blog.csdn.net/chenbeifang/article/details/89511434
今日推荐