title: Get WPF window from Windows Forms control in WindowsFormsHost
body: <p>I have a Windows Forms control that is hosted in a WindowsFormsHost.  This is the XAML I use to accomplish this:</p>
  
  <pre><code>&lt;Window x:Class="Forms.Address.MyWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:local="clr-namespace:Forms.Address"
          xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"  
          mc:Ignorable="d"
          Title="New Window" Height="500" Width="720"&gt;
      &lt;Grid&gt;
          &lt;WindowsFormsHost x:Name="host"&gt;
              &lt;local:MyFormsControl x:Name="genericName"/&gt;
          &lt;/WindowsFormsHost&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>I want to listen to events from the window that the WindowsFormsHost is in.  This is simple in a Windows form because I can use the <code>FindForm</code> method to get the form that my control is in.  However, for obvious reasons, <code>FindForm</code> does not work when a control is inside of a WindowsFormsHost.  The parent of my control is a <code>System.Windows.Forms.Integration.WinFormsAdapter</code> and its parent is null.</p>
  
  <p>My question is this: how can find the window that contains my control?</p>