title: WPF issue with TreeView and Popup controls
body: <p>When using a Popup inside a TreeView in WPF I am running into an issue where the controls inside the popup become unusable. For example, using the following code the ToggleButton inside the popup can only be toggled once and then becomes unable to be toggled back. Is there any way to work around this issue?</p>
  
  <pre><code>&lt;Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt;
      &lt;Grid&gt;
          &lt;TreeView&gt;
              &lt;TreeViewItem&gt;
                  &lt;TreeViewItem.Header&gt;
                      &lt;StackPanel&gt;
                          &lt;ToggleButton&gt;
                              Button outside popup
                          &lt;/ToggleButton&gt;
                          &lt;Popup IsOpen="True"&gt;
                              &lt;ToggleButton&gt;
                                  Button inside popup
                              &lt;/ToggleButton&gt;
                          &lt;/Popup&gt;
                      &lt;/StackPanel&gt;
                  &lt;/TreeViewItem.Header&gt;
              &lt;/TreeViewItem&gt;
          &lt;/TreeView&gt;
      &lt;/Grid&gt;   
  &lt;/Page&gt;
  </code></pre>