框架与网络浏览器

发布于 2024-09-13 08:35:35 字数 162 浏览 1 评论 0原文

如果我想要做的就是在 WPF 应用程序中显示某些网页的内容,那么使用 WebBrowser 控件与 Frame 控件相比有何优缺点?据我了解,无论如何,Frame 都会包装 WebBrowser。

我不需要在我的控件中显示 WPF,因此 Frame 的功能与我无关。

提前致谢。

If all I'm trying to do is display the contents of some web page in a WPF app, what are the pro's and cons of using the WebBrowser control versus the Frame control? As I understand it Frame wraps WebBrowser anyway.

I have no need to display WPF in my control so that feature of Frame doesn't concern me.

Thanks in advance.

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

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

发布评论

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

评论(2

帅哥哥的热头脑 2024-09-20 08:35:35

如果您只想显示网页,我会使用 WebBrowser 控件。即使只是因为命名更有意义并且更容易一眼理解“框架”的用途。

If you're just wanting to display a webpage, I would use the WebBrowser control. Even if it's only for the reason that the naming makes more sense and is easier to understand at a glance what the "frame" is for.

安人多梦 2024-09-20 08:35:35

“Frame”可以将 WPF 内容显示为子项,并且仅在显示“web”内容时才启动 IE ActiveX 控件。 (首先显示您的内部应用程序帮助内容或数据内容,然后提供指向网页的链接以获取其他详细信息。)我认为,如果您正在考虑通过 Web 内容增强 XAML 静态内容(1),那么 Frame 是最佳选择。

1 - 请参阅 FlowDocument

The 'Frame' can display WPF content as children, and spin-up the IE ActiveX control only when 'web' content is displayed. (Start by displaying your internal application help content or data content, then have a link to web page for additional details.) I think if you're considering XAML static content(1) augmented by web content then Frame is the best choice.

1 - see FlowDocument

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