title: Getting the text of the menu item that was clicked?
body: <p>I have a context menu that's bound to a list of strings so that each menuitem's text is an element of the string list. Each menuitem is set to the same event handler. What I'm trying to do is to figure out is which menu item was clicked when when the event handler is called. </p>
  
  <p>I would think it would be pretty straight forward to do, but I'm a bit stumped.</p>
  
  <p>If I look at the watch window, there's a menuitem property called FocusedItem. It has the information I need but when I try to use it it doesn't seem to be part of the class and the code doesn't even compile, which I find strange.</p>
  
  <p>Can someone point me in the right direction? </p>
  
  <p>The bit of xaml and code I'm having trouble with:</p>
  
  <pre><code>&lt;MenuItem Header="Add Object"  ItemsSource="{Binding ObjectClassList}" Click="AddObject_Click"/&gt;
  
      private void AddObject_Click(object sender, RoutedEventArgs e)
      {
          MenuItem menuItem = sender as MenuItem;
  
          if (menuItem == null)
          {
              return;
          }
  
          // menuItem.FocusedItem // ?? does not compile
  
  
      }
  </code></pre>
  
  <p>Thanks!</p>