【发布时间】:2013-11-24 14:00:35
【问题描述】:
我正在开发一个 windows phone 8 应用程序。在我的应用程序中,我使用 WebBrowser 控件来显示 HTML 格式的字符串。我需要用黑色背景显示 html 格式的文本。我做得很成功,但问题是
当 html 格式的字符串在 WebBrowser 中呈现时,它首先显示白色,然后显示带有黑色背景的实际字符串。它看起来像 flick 效果,然后显示我的 html 格式的字符串。
我使用的代码是:
string html = ("<!DOCTYPE html5><html><head><meta name=\"viewport\" content=\"user-scalable=no background-color:black\" />" + sctipy + "</head><body style= \"background:#000; color:#fff;\"><div id=\"content\">" + myHtmlFormattedString + "</div></body>" + "</html>");
webbrowser.NavigateToString(html);
是否有其他解决方案,例如将 WebBrowser 控件的默认背景更改为白色以外的其他解决方案
【问题讨论】:
标签: html windows-phone-7 windows-phone-8 meta