In this article, I will teach you, how to add WPF menu bar at top position in window, Add items in it, add image as icon in it, also handle click event on each items of it. I explained, how to add items with underline.
<Window x:Class="WpfApplication5.MainWindow"
The above-mentioned XAML code define, a menu control inside in DockPanel control at top position. The first item in the menu works as container. In the first menu item, we have three child items. First child item contains shortcut key by using command attribute. Second child item appears as simple text, last item contain image. Similarly add another menu item in the menu control for making second parent item with click event. 
  private void MenuItem_Click(object sender, RoutedEventArgs e)  
     {  
       MessageBox.Show("second parent first child clicked");  
     }  
Code generates the following output:
 
