如何在 Windows 8 webviews 中禁用缩放 [英] How to disable zoom in Windows 8 webviews

查看:16
本文介绍了如何在 Windows 8 webviews 中禁用缩放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在应用中使用 webview 来显示外部托管的内容,但 web view 允许用户使用捏合手势进行缩放,我想禁用它.

我在 webview 本身上找不到任何这样的属性,而且我没有成功使用视口元标记,例如:

有没有办法做到这一点?

解决方案

很遗憾,这是不可能的.

http://social.msdn.microsoft.com/Forums/en-AU/winappswithcsharp/thread/8eecf85d-ebd3-4bc0-ad17-15f342efad25

如果 WebView 的工作方式与 WP7 版本类似,那么您可以在 html 中捕获事件并在那里取消它们,类似于 这个.>

I'm using a webview in an app to display externally hosted content, but the web view lets the user zoom with a pinch gesture and I'd like to disable this.

I can't find any such property on the webview itself, and I've not had any success with a viewport meta tag such as:

<meta name="viewport" content="user-scalable=no">

Is there a way to do this?

解决方案

Unfortunately this is not possible.

http://social.msdn.microsoft.com/Forums/en-AU/winappswithcsharp/thread/8eecf85d-ebd3-4bc0-ad17-15f342efad25

If the WebView works similarly to the WP7 version then you may be able to catch the events in html and cancel them there similarly to this.

这篇关于如何在 Windows 8 webviews 中禁用缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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