Are there any disadvantages to hosting a Windows Forms Control in a WPF Application?
在WPF应用程序中托管Windows窗体控件有什么缺点吗?
My first thought is that performance might be hurt a little bit. Also, there is the air gap issue between the forms control and the wpf application.
我的第一个想法是性能可能会受到一点伤害。此外,窗体控件和wpf应用程序之间存在气隙问题。
2 个解决方案
#1
3
What Jeff wrote plus there are also some graphical glitches as well (especially when resizing).
Jeff写的内容还有一些图形故障(特别是在调整大小时)。
#2
3
My experience:
-
Slight performance impact. Generally resolvable by using double buffering though...
轻微的性能影响。通常使用双缓冲可以解决...
-
Some Winforms events are not fired correctly or reliably. This is a known issue and has workarounds although I've found it pretty annoying.
某些Winforms事件未正确或可靠地触发。这是一个已知的问题,并且有一些解决方法,虽然我发现它很烦人。
In general though, I've hosted entire Winforms applications in a WPF Browser Application with success.
但总的来说,我已经成功地在WPF浏览器应用程序中托管了整个Winforms应用程序。
#1
3
What Jeff wrote plus there are also some graphical glitches as well (especially when resizing).
Jeff写的内容还有一些图形故障(特别是在调整大小时)。
#2
3
My experience:
-
Slight performance impact. Generally resolvable by using double buffering though...
轻微的性能影响。通常使用双缓冲可以解决...
-
Some Winforms events are not fired correctly or reliably. This is a known issue and has workarounds although I've found it pretty annoying.
某些Winforms事件未正确或可靠地触发。这是一个已知的问题,并且有一些解决方法,虽然我发现它很烦人。
In general though, I've hosted entire Winforms applications in a WPF Browser Application with success.
但总的来说,我已经成功地在WPF浏览器应用程序中托管了整个Winforms应用程序。