Any disadvantage to using an ElementHost to host a WPF UserControl in a Winform application?

半城伤御伤魂 提交于 2019-12-05 14:31:21

I see a few potential disadvantages.

First, you now have two ways of displaying UI. This can present issues from a maintenance point of view depending the developers touching the code.

Second, WPF does have a runtime associated with it (for dispatching events, dependency property management, etc, etc), but it's a one-time cost. If you are using that for a small number of controls, then you are paying a relatively large cost in proportion to it's usage.

I wouldn't say these are deal-breakers, it's all dependent on your app and your team.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!