gpt4 book ai didi

html - 将 System.Windows.Controls.WebBrowser 的内容设置为静态 HTML 文字?

转载 作者:太空宇宙 更新时间:2023-11-04 14:08:49 25 4
gpt4 key购买 nike

我想设置 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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com