I'm going to have to build a custom control for a WinForms application. But in the near future that same control will have to be used in a WPF application.
I've already written all the logic in a controller class which I can use for both WinForms and WPF (I will only have some databinding to do and that's it), but of course it would be easier to develop and maintain the control only once.
So can I build the control in WPF and then put them on a WinForms form? My projects currently have 3.0 as their target framework.
Yes you can!
In WinForms use ElementHost and add you WPF control inside (Best practice here is to create a WPF User Control and add you controls into the user control)
And in WPF, if you want to use a WinForms user control, use the WindowsFormsHost
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With