本文介绍了禁用缩放/平移/滚动功能WebBrowser控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到它是如何不可能禁止在Web浏览器控制缩放/旋转/滚动功能很多帖子的本地对于Windows Phone 7的那么选择我们呢?

I have seen many posts about how it's impossible to disable the zoom/pan/scroll functions on the Web-browser control natively for Windows Phone 7. So what options do we have?

推荐答案

我做了一个小挖,我发现了一个快速的方法来做到这一点,所以我想我会在这里分享。
这并不是code的快速几行这是一种耻辱,但是这一切到了网络上,所以应该很容易实现。首先,你需要的LINQ的DDL和这里这个类称为。然后你就可以在 WebBrowserHelper类,你只是通过在Web浏览器在创建webBrowserHelper和其余的照顾。你甚至可以设置您是否想滚动被禁用。

I did a little digging and I found a quick way to do so, so I thought I'd share it here.It's not a quick few lines of code which is a shame but all of it is up on the web so it should be easy to implement. First you need the Linq ddl and this class here called LinqToVisualTree. Then you can use these in a WebBrowserHelper class where you just pass in your web browser when you create the webBrowserHelper and the rest is taken care of. You can even set whether or not you'd like the scrolling to be disabled.

的一个问题,我发现这个是,当我在网页上双击它仍然放大的时候。有谁知道这可能是固定的吗?我敢肯定有一种方法使用做到这一点,但我不能弄明白。

One problem I found with this was that when I double tap on the web page it still zooms in sometimes. Does anyone know how this might be fixed? I'm sure there is a way to do it using the LinqToVisualTree but I can't figure it out.

这篇关于禁用缩放/平移/滚动功能WebBrowser控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 15:10