How to find in code the parent Window or WinForm of a WPF control?

Posted by Trainee4Life on Stack Overflow See other posts from Stack Overflow or by Trainee4Life
Published on 2010-06-16T16:05:16Z Indexed on 2010/06/16 16:12 UTC
Read the original article Hit count: 190

Filed under:
|

I have a situation where I need to find the parent Window or WinForm which is hosting the WPF control. I need to get the handle of either the parent Window or WinForm whatever the case may be.

The problem is when the WPF control is hosted in a WinForm using ElementHost. How can I find the Handle of the hosting WinForm from a WPF control.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about interop