我试图在 Windows Phone 7.1 上的 WebBrowser 中加载本地文件,但我总是遇到异常或空白页。
我试过了
Stream stream = Application.GetResourceStream(
new Uri("./Html/par/index.html",
UriKind.Relative)).Stream;
using (StreamReader reader = new StreamReader(stream))
{
// Navigate to HTML document string
this.webBrowser.NavigateToString(reader.ReadToEnd());
}
这是触发空白页。
我将 index.html 和所需的所有文件(css/js)设置为 Content 并将 IsScriptEnable 设置为“true”。
你知道如何解决这个问题吗?