title: Menu Item Click event According to Index
body: <p>I have a menu item which has children menu items. When one of the menu items clicked, an event will be fired and do something according to the index of clicked menu item. I have seen such applications but in those cases name of menu item was criterion not index. I want something like this:</p>
  
  <pre><code>private void MI_Click (object sender, RoutedEventArgs e)
  {
      MenuItem mnu = (MenuItem)e.OriginalSource;
  
      switch (mnu.Items.Index) // I know there is no such thing
      {
          case 0: {// do something}
          case 1: {// do something}
          // and so on
      }
  }
  </code></pre>