WPF框架和WebBrowser控件之间的差异

时间:2020-12-21 15:51:39

I'm working on a web-enabled media center which will be able to load video feeds into a gallery style view. (like Cooliris)

我正在开发一个支持web的媒体中心,它可以将视频提要加载到一个画廊样式的视图中。(如Cooliris)

Rather than loading thumbnail images of each video, I plan to load the actual video so it can be played in-place and/or popped out to fullscreen.

我不打算加载每个视频的缩略图,而是打算加载实际的视频,以便在适当的地方播放,或者弹出到全屏。

This means I need to host a bunch of flash-player instances 'inside' my WPF Page.

这意味着我需要在我的WPF页面“内部”托管一堆flash播放器实例。

Is there any advantage to using a Frame control rather than an SP1 WebBrowser control? I know that, while the WebBrowser is technically a wrapped Windows Forms control and the Frame control is 'native' wpf, even the Frame control uses a win32 MS.Internal.Controls.WebBrowser to show content.

使用框架控件而不是SP1 web浏览器控件有什么好处吗?我知道,虽然WebBrowser在技术上是一个封装的Windows窗体控件,而框架控件是“本机”wpf,但即使框架控件也使用win32 MS.Internal.Controls。浏览器显示内容。

Given this fact, are the two controls roughly equivalent, especially as performance is concerned?

考虑到这一事实,这两个控件是否大致相同,尤其是在性能方面?

1 个解决方案

#1


4  

The big difference is that Frame can host WPF or HTML content. How it does this is by piping the content to either WPF or IE, so it's not doing any rendering itself and WPF never renders the HTML natively. So if you have (or may have in the future) a need to seamlessly host WPF or HTML content in the same control then Frame is definitely what you want. That said, I don't know of a downside to using Frame so that's what I use even if it's exclusively for HTML.

最大的区别在于框架可以托管WPF或HTML内容。这样做的方式是将内容发送到WPF或IE中,因此它不会做任何呈现,WPF也不会自然地呈现HTML。因此,如果您(或将来)需要在同一个控件中无缝地托管WPF或HTML内容,那么框架肯定是您想要的。这就是说,我不知道使用框架有什么不好的地方,所以这就是我使用的,即使它是专门用于HTML的。

#1


4  

The big difference is that Frame can host WPF or HTML content. How it does this is by piping the content to either WPF or IE, so it's not doing any rendering itself and WPF never renders the HTML natively. So if you have (or may have in the future) a need to seamlessly host WPF or HTML content in the same control then Frame is definitely what you want. That said, I don't know of a downside to using Frame so that's what I use even if it's exclusively for HTML.

最大的区别在于框架可以托管WPF或HTML内容。这样做的方式是将内容发送到WPF或IE中,因此它不会做任何呈现,WPF也不会自然地呈现HTML。因此,如果您(或将来)需要在同一个控件中无缝地托管WPF或HTML内容,那么框架肯定是您想要的。这就是说,我不知道使用框架有什么不好的地方,所以这就是我使用的,即使它是专门用于HTML的。