title: How to associate an event with a menuitem in WPF using VS2008?
body: <p>I am in the process of learning WPF (I don't know much yet).  I know how to associate a menu subitem to an event by directly editing the xaml but, I'd like to know how to do the same thing using Visual Studio.  </p>
  
  <p>For instance, consider the following XAML snippet:</p>
  
  
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;Menu DockPanel.Dock ="Top"
            HorizontalAlignment="Left" Background="White" BorderBrush ="Black"&gt;
         &lt;MenuItem Header="_File"/&gt;
         &lt;Separator/&gt;
         &lt;MenuItem Header ="_Exit"
                   MouseEnter ="MouseEnterExitArea"
                   MouseLeave ="MouseLeaveArea"
                   Click ="FileExit_Click"/&gt;
  </code></pre>
  
  <p>I'd like to be able to associate the "_Exit" menuitem with the appropriate event handlers for MouseEnter, MouseLeave and Click using Visual Studio instead of manually editing the xaml text.   I was trying to accomplish this by using the "Items" collection editor but, it seems to only allow editing of the subitem's properties and not the events.  Is there another editor/dialog/etc that allows editing the subitem's events ?</p>
  
  <p>Thank you for your help, </p>
  
  <p>John.</p>
  
  <p>P.S: thank you H.B for taking the time to format the xaml properly. :-)</p>