简体   繁体   中英

Embed Windows.Form in WPF application

I was wondering, is there a consequence to embed a Windows.Form element in a WPF application ?

I don't really know the difference between both architectures, but mixing them can have negative impacts ?

There are always consequences with such choices. Mainly winform doesn't support wpf event mechanism for bubbling event and dependency properties, you have to wrap it up if you want to use some binding and follow the MVVM pattern.

Besides, it will not be a part of the visual tree if I remember well. It will create an other form over the form of your application, ie an other window handle...

Not impossible, but You got to wondering yourself If it is worth it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM