如何使在Windows Phone的7.1黑色背景的网页浏览器控制 [英] How to make Webbrowser control with black background in Windows Phone 7.1

查看:102
本文介绍了如何使在Windows Phone的7.1黑色背景的网页浏览器控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用WebBrowser控件来显示本地HTML内容,使HTML页面的背景色为黑色。

I am using webbrowser control to show local html content, cause the the background-color of the html page is black.

当我使用NavigateToString方法导航到网页浏览器,web浏览器的背景变成白色,立即后白来的html页面,那么背景变成黑色。

When I using NavigateToString method to navigate to the webbrowser, the webbrowser's background become white immediately, after a white coming the html page, then the background become black.

这是一个有点不安。考虑提供最好的UX,我想要实现的web浏览器的默认背景是黑色的。

It's a little disturbing. Consider providing the best UX, I want to implement that the default background of the webbrowser is black.

Thx提前。

推荐答案

不幸的是,这是WebBrowser控件的一个怪癖。与WP7编写PhoneGap的应用程序时,我发现了相同的问题。我想出了解决的办法是建立覆盖WebBrowser控件UI元素,等待要呈现的内容,然后淡出和隐藏覆盖件,<一个href=\"http://www.scottlogic.co.uk/blog/colin/2011/12/a-simple-multi-page-windows-phone-7-phonegap-example/\"相对=nofollow>在这个博客帖子描述

Unfortunately this is a quirk of the WebBrowser control. I discovered the exact same issue when writing PhoneGap applications with WP7. The solution I came up with was to create a UI element that covers the WebBrowser control, wait for the content to be rendered, then fade out and hide the covering element, as described in this blog post.

这篇关于如何使在Windows Phone的7.1黑色背景的网页浏览器控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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