Curious if there are any drawbacks to using ElementHost to host a WPF user control in a Winform application?
I ask, because overall, I feel it takes a lot of time for me to create a new WPF application with a basic interface that looks decent. Decent in the sense that if I create a new Winforms application and throw some controls on it, I get a basic interface that looks and behaves like many other applications, but does not look simple. If I do the same with the WPF application, I don’t feel that I am achieving the same results, I get a “simple” application with a white background, unless I change the role of the designer and take the extra time to make it look a certain way.
However, there are cases when I need WPF for this relatively easy to create a stylized interface. Consider controlling a video player; in WPF, I can create something that looks very nice and custom, but takes much less time and effort than controlling Winforms. In these cases, it makes sense for me to use WPF, as I end up spending less time than I would bypass OnPaint :-).
I understand that I use a lot of subjective terms, but these are my considerations on the original question.
Update:
Just to clarify my video player control example. WPF gives me not only MediaElement , but if I want to say, put a play button on the video when it is paused, or if I need a translucent panel “play / pause / stop / volume” to appear when the mouse is in a certain place, WPF makes it a lot easier than any Winforms alternative.
Edit:
Maybe I have a configuration parameter incorrectly or something else, but it also upsets the Description section, disappears when I look at WPF and Winforms Control. Even more frustrating is that pressing F1 in the form of a WPF property will not lead you to the specific property / event you were in.
Update:
Anyone else? I am more concerned about the impact of performance and / or limitations on the features that will be introduced by placing the WPF UserControl in ElementHost . So far, it sounds like it’s overhead at runtime, but is that all?