public MainPage()
{
InitializeComponent();
WebBrowser test = new WebBrowser();
string tes1t = @"<!DOCTYPE html>
<html>
<head>
<title>Sample Page</title>
<meta charset=""utf-8"">
</head>
<body>
<p>sample html Navigate to string</p>
</body>
</html>";
test.IsScriptEnabled = true;
test.ScriptNotify += test_ScriptNotify;
test.IsHitTestVisible = true;
test.NavigateToString(tes1t);
ContentPanel.Children.Add(test);
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
}
void test_ScriptNotify(object sender, NotifyEventArgs e)
{
// throw new NotImplementedException();
}
在上面的示例代码中,当网络浏览器使用给定的 html5 文本导航到字符串时,呈现是正确的,但是当我删除元标记时,导航是正确的,无法弄清楚原因