title: How to add a user control to a context menu
body: <p>In my Windows Form Application, I have created a context menu for a panel. I have also created a User Control, which I want to appear as a menu item on my menu.
  Currently, I can create an instance of the User Control when I click an item - &quot;properties&quot; - on the menu, but I would like it to appear to actually be a part of the menu, like this:
  <img src="https://i.stack.imgur.com/PgALz.jpg" alt="An example I mocked up in Paint" /></p>
  <p>Here is my current code for adding menu items and the event handler that is called when you mouse over the option.</p>
  <pre><code>private static void SetUpContextMenu()
  {
      mnu = new ContextMenu();
      MenuItem mnuAdd = new MenuItem(&quot;Add child&quot;);
      MenuItem mnuDel = new MenuItem(&quot;Delete&quot;);
      MenuItem mnuProperties = new MenuItem(&quot;Change properties&quot;);
      mnuAdd.Click += new EventHandler(mnuAdd_Click);
      mnuDel.Click += new EventHandler(mnuDel_Click);
      //display the user control when this event occurs
      mnuProperties.Select += MnuProperties_Select;
      mnu.MenuItems.AddRange(new MenuItem[] { mnuAdd, mnuDel, mnuProperties });
  }
  
  private static void MnuProperties_Select(object sender, EventArgs e)
  {
      //create new instance of User Control (NodeInspector)
      //add NodeInspector to context menu
  }
  </code></pre>
  <p>Does anyone know how I can add this user control to my context menu?
  Thank you!</p>