WebView“已禁用"在 Windows 8.1 中 [英] WebView "disabled" in Windows 8.1

查看:30
本文介绍了WebView“已禁用"在 Windows 8.1 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的应用程序升级到 Windows 8.1,但现在我加载到 WebView 中的页面不再具有交互性.我无法按任何按钮或填写任何 HTML 表单字段.我的 WebView 看起来像这样

I just upgraded my app to Windows 8.1, but now pages that I am loading into the WebView are no longer interactive. I can't press any buttons or fill out any HTML form fields. My WebView looks like this

<WebView x:Name="browser" ScrollViewer.ZoomMode="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled"></WebView>

推荐答案

我刚刚基于 Blank App (XAML) 模板为 Windows 8.1 创建了一个新的 Windows 应用商店应用,只将以下行放入其中MainPage.xamlGrid:

I just created a new Windows Store app for Windows 8.1 based on the Blank App (XAML) template only putting the following line inside the Grid of MainPage.xaml:

<WebView x:Name="browser" ScrollViewer.ZoomMode="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Source="http://www.quackit.com/html/codes/html_form_code.cfm" />

HTML 表单控件的行为符合预期.这对你有用吗?您的页面上是否还有其他可能阻止与 HTML 控件交互的内容?

The HTML form controls behave as expected. Does this work for you? Do you have anything else on your page that could prevent interaction with HTML controls?

也许您对 WebView 有其他(透明)控件.Windows 8.1 中的 z-ordering 发生了变化:在 Windows 8 中 WebView 总是呈现在其他控件之上,现在它可以呈现在其他控件之下.

Maybe you have other (transparent) controls over the WebView. There's a change in z-ordering in Windows 8.1: in Windows 8 WebView was always rendered on top of other controls, now it can be rendered under other controls.

这篇关于WebView“已禁用"在 Windows 8.1 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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