title: Missing library for ContextMenu
body: <p>I'm using a code for get the name of the control that fire the ContextMenu, but the compiler return this message on this line: <code>ContextMenu menu = menuItem.GetContextMenu();</code></p>
  
  <blockquote>
    <p>MenuItem does not contain a definition of GetContextMenu and found no extension method 'GetContextMenu' accepting a first argument of type 'MenuItem'. Probably missing a using directive or an assembly reference.</p>
  </blockquote>
  
  <p>The same error here:</p>
  
  <pre><code>Control sourceControl = menu.SourceControl;
  </code></pre>
  
  <p>This is my method:</p>
  
  <pre><code>private void ClearTable_Click(object sender, RoutedEventArgs e)
      {
          // Try to cast the sender to a MenuItem
          MenuItem menuItem = sender as MenuItem;
          if (menuItem != null)
          {
              // Retrieve the ContextMenu that contains this MenuItem
              ContextMenu menu = menuItem.GetContextMenu();
  
              // Get the control that is displaying this context menu
              Control sourceControl = menu.SourceControl;
          }
      }
  </code></pre>
  
  <p>Which library I must to add?</p>