如何在 Silverlight 4.0(浏览器外)中托管 HTML?

发布于 2025-01-06 10:36:08 字数 85 浏览 4 评论 0原文

我必须在 Silverlight 4.0 中托管 HTML,仅适用于浏览器外应用程序。

我怎么做到这一点?

请给我解决方案。

I have to host HTML in Silverlight 4.0 Only for Out of Browser Application.

How i do that?

Please Give me Solution.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

土豪我们做朋友吧 2025-01-13 10:36:08

您应该注意,只有浏览器外应用程序支持 WebBrowser 控件,
如果您尝试在浏览器内应用程序中使用它,它不会显示任何内容。
因此,将此 WebBrowser 标记添加到您的 xaml 页面中。

<WebBrowser x:Name="wbFrame" Source="http://www.stackoverflow.com" />

或者如果你想使用html标签,你可以在后面的代码中使用WebBrowser类的属性NavigateToString

wbFrame.NavigateToString("your html text");

you should note that only Out-of-Browser applications support the WebBrowser control,
and if you try to use it in an in-browser app, it will not display anything.
so add this WebBrowser tag to your xaml page.

<WebBrowser x:Name="wbFrame" Source="http://www.stackoverflow.com" />

or if you want to use a html tag ,you can use the property NavigateToString of WebBrowser Class in the code behind;

wbFrame.NavigateToString("your html text");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文