title: ContextMenu of TabControl "blinks" when opened a second time
body: <p>My <code>ContextMenu</code> shows a weird behaviour when opened again, i.e. "right-clicking" a second time such that the menu closes and openes again at the new position; the menu is part of a <code>TabControl</code>.</p>
  
  <p>Basically, when I right-click the <code>TabControl</code> the menu opens normally, but if I right-click again while the menu is already open, the old one disappears and the new one (at the new mouse position) "blinks" once before normally opening. It looks like the menu very quickly openes, then closes, and then opens normally.</p>
  
  <p>First I thought it might have something to do with another event that is raised while clicking the <code>TabControl</code>, but removing this event did not help.</p>
  
  <p>If anyone wants some code, please ask. But I think the code is not helpful, as the relevant code here would be completely trivial.</p>
  
  <p><strong>Edit:</strong></p>
  
  <pre><code>&lt;Window x:Class="WpfApplication1.MainWindow"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      Title="MainWindow" Height="350" Width="525"&gt;
  &lt;Grid&gt;
      &lt;TabControl Height="287" HorizontalAlignment="Left" Margin="12,12,0,0" Name="tabControl1" VerticalAlignment="Top" Width="479"&gt;
          &lt;TabControl.ContextMenu&gt;
              &lt;ContextMenu IsEnabled="True" StaysOpen="True"&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
                  &lt;MenuItem Header="Test1"&gt;&lt;/MenuItem&gt;
              &lt;/ContextMenu&gt;
          &lt;/TabControl.ContextMenu&gt;
          &lt;TabItem Header="tabItem1" Name="tabItem1"&gt;
              &lt;Grid&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width="40*" /&gt;
                      &lt;ColumnDefinition Width="150*" /&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
              &lt;/Grid&gt;
          &lt;/TabItem&gt;
      &lt;/TabControl&gt;
  &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>No other code was added to the .cs file and this behaviour occours.</p>