我想设置 WPF WebBrowser 控件的内联内容:
<WebBrowser>
<html>
<body><b>Inline content.</b></body>
</html>
</WebBrowser>
或者:
Dim wb As New WebBrowser
wb.Content = "<html><body><b>Programmatic content</b></body></html>"
最佳答案
调用NavigateToString或 NavigateToStream:
wb.NavigateToString("<html><body><b>Programmatic content</b></body></html>");
是的,他们的名字很糟糕。
关于html - 将 System.Windows.Controls.WebBrowser 的内容设置为静态 HTML 文字?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1598030/