title: WPF Popup IsOpen issue
body: <p>Using a concept found <a href="https://stackoverflow.com/a/8946055/24399">here on StackOverflow</a>. <strong>Note that the <code>ToggleButton.IsHitTestVisible</code> is bound to <code>Popup.IsOpen</code>, with <code>StaysOpen="False"</code>.</strong> This should mean that touching anywhere <em>outside</em> the <code>Popup</code> would cause it to close. However...</p>
  
  <p>Touching/Clicking on an <code>ListBoxItem</code> in the <code>ItemsControl</code> won't close the <code>Popup</code>, as is intended. Touching anywhere else within the <code>Popup</code> <em>does</em> close it. That doesn't seem to add up, according to how this is set up.</p>
  
  <pre><code>&lt;Grid ClipToBounds="True"&gt;
      &lt;Border Name="Root"&gt;
          &lt;ToggleButton x:Name="PART_Toggle"
                    ClickMode="Release"
                    IsHitTestVisible="{Binding ElementName=PART_Popup,
                                               Path=IsOpen,
                                               Mode=OneWay,
                                               Converter={StaticResource BooleanInverter}}"/&gt;
      &lt;/Border&gt;
      &lt;Popup x:Name="PART_Popup"
             IsOpen="{Binding ElementName=PART_Toggle,
                              Path=IsChecked}"
             PlacementTarget="{Binding ElementName=PART_Toggle}"
             StaysOpen="False"&gt;
          &lt;Grid Background="Transparent"&gt;
              &lt;Grid&gt;
                  &lt;!-- Anything here (outside of the Item) --&gt;
                  &lt;ItemsControl&gt;
                      &lt;ItemsControl.ItemTemplate&gt;
                          &lt;DataTemplate&gt;
                              &lt;Grid&gt;
                                  &lt;!-- Anything in this item template works. The popup does not close --&gt;
                              &lt;/Grid&gt;
                          &lt;/DataTemplate&gt;
                      &lt;/ItemsControl.ItemTemplate&gt;
                  &lt;/ItemsControl&gt;
              &lt;/Grid&gt;
              &lt;/Border&gt;
          &lt;/Grid&gt;
      &lt;/Popup&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Any ideas? Thanks.</p>
  
  <hr>
  
  <p><strong>Edit:  Solved</strong></p>
  
  <p>Turns out this was happening because it was inside a custom control which was derived from <code>ListBox</code>. It didn't seem relevant at the time I made this question, sorry. </p>