Search code examples
wpfformswinforms-interop

WPF App - How to obtain a reference to the corresponding System.Windows.Forms.Form?


In my WPF Project I have a WPF Window. I want to use Sticky Windows Solution in my WPF Project. The library wants only one parameter: the System.Windows.Forms.Form object.

Does it exist any way to obtain a Form object starting from a WPF Window object?


Solution

  • No, it's not possible. A WPF Window has no inheritance relation with a Windows Forms Form. However it would probably be possible to adapt the code from the library to mentioned so that it works with WPF...