title: WPF Popup MenuItem stays highlighted when using arrow keys
body: <p>After opening a Popup menu programatically, if the user uses up and down arrow keys to move through the menu, menu items get highlighted and they never get unhighlighted.  What can I do so that after the user presses the down arrow, the previously highlighted menuitem becomes unhighlighted?</p>
  
  <p>This happens with a very simple Popup menu:</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;Button x:Name="Button1" Content="Open Menu" 
              Click="OnPopupMenuButton_Click"
              Height="23" HorizontalAlignment="Left" Margin="69,12,0,0" VerticalAlignment="Top" Width="75" /&gt;
  
      &lt;Popup x:Name="MyPopupMenu" StaysOpen="False" &gt;
          &lt;StackPanel Orientation="Vertical" Background="White" Margin="0"&gt;
              &lt;MenuItem x:Name="xAimee" Header="Aimee" Margin="0,2,0,0" /&gt;
              &lt;MenuItem x:Name="xBarbara" Header="Barbara" /&gt;
              &lt;MenuItem x:Name="xCarol" Header="Carol" /&gt;
              &lt;Separator x:Name="xSeparator1" Margin="0,2,2,2"/&gt;
              &lt;MenuItem x:Name="xDana" Header="Dana" /&gt;
              &lt;MenuItem x:Name="xElizabeth" Header="Elizabeth" /&gt;
          &lt;/StackPanel&gt;
      &lt;/Popup&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Here is how the Popup gets opened:</p>
  
  <pre><code>private void OnPopupMenuButton_Click(object sender, System.Windows.RoutedEventArgs e)
  {
      Button button = sender as Button;
  
      MyPopupMenu.PlacementTarget = button;
      MyPopupMenu.Placement = PlacementMode.Mouse;
      MyPopupMenu.IsOpen = true;
      MyPopupMenu.StaysOpen = false;
  }
  </code></pre>