MZ-Tools Articles Series: HOWTO: Host a Windows Forms usercontrol in a toolwindow from a Visual Studio package.
When you create a toolwindow with the Visual Studio package wizard, a Windows Presentation Foundation (WPF) usercontrol is used. If you are migrating an add-in to a package, chances are that your toolwindows use Windows Form usercontrols and you don’t want to change the forms technology (migrating the add-in to a package is enough work…). It happens that the way to host a usercontrol in a toolwindow is different for WPF and Windows Forms. In the former case you only have to assign the Content property to the instance of the usercontrol. If you do the same in the latter case, nothing happens (you don’t even get an exception). For Windows Forms usercontrols, you need to override the Window property to return the instance of the usercontrol.
My latest article explain it with sample code:
HOWTO: Host a Windows Forms usercontrol in a toolwindow from a Visual Studio package.