在 WP7 的浏览器控件中禁用滚动? [英] Disable scrolling in browser control for WP7?

查看:23
本文介绍了在 WP7 的浏览器控件中禁用滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 Windows Phone 7.1 中禁用 Web 浏览器控件中的滚动?我已经看到很多围绕它提出的问题(Windows Phone 7.0、Silverlight),但答案尚未出现.有什么想法吗?

Is it possible to disable the scrolling in a web browser control in Windows Phone 7.1? I have seen quite a few questions ask around it (Windows Phone 7.0, Silverlight) but an answer has yet to come up. Any ideas?

推荐答案

有一个 此处的博客文章 解释了如何抑制 WebBrowser 控件的缩放和滚动功能.引用那篇文章:

There is a blog post here explaining how to suppress the zoom and scroll functionality of the WebBrowser control. Quote from that post:

视觉树非常简单,由几个网格和边框组成.重要的部分是 TileHost,它是原生的 IE9组件和 PanZoomContainer.TileHost 不处理鼠标操作事件,这些事件由PanZoomContainer,然后将它们转换为手势(即pinch-zoom) 并将结果反馈给 TileHost.

The visual tree is quite simple, composed of a few grids and borders. The significant parts are the TileHost, which is the native IE9 component, and the PanZoomContainer. The TileHost does not handle the mouse manipulation events, these are instead handled by the PanZoomContainer, where they are then translated into gestures (i.e. pinch-zoom) with the result fed back to the TileHost.

这意味着我们可以拦截操作事件作为它们冒泡到 PanZoomContainer,在它们之前取消它们变成了手势.

What this means is that we can intercept the manipulation events as they bubble up to the PanZoomContainer, cancelling them before they are turned into gestures.

这篇关于在 WP7 的浏览器控件中禁用滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆