title: Can't find context menu in control collection
body: <p>I have a form. This form has a user control. This user control has a panel and a context menu. The context menu is not attached to the panel. There are other controls that are dynamically created and added to this panel. One of those controls is a button. When you click this button, I set the contextmenustrip property to my context menu.</p>
  
  <p>My problem is that I need to read the items in that context menu prior to there being the opportunity to attach the context menu to the button.</p>
  
  <p>Each time a form is loaded, I iterate though all the child controls of the form. If a control has children, I iterate through those, and so on... I can't seem to get at the context menu that is unassigned so to speak. It has not been attached to any control so it does not appear to be a child control of any controls on the form.</p>
  
  <p>myConectMenu is never added to the user conrol like this.Controls.Add(myConectMenu). How can that context menu not be nested in the forms control collection? How can I get at that context menu? </p>
  
  <p>Here is the designer code: </p>
  
  <pre><code>private System.Windows.Forms.ContextMenuStrip myContextMenu;
  
  void InitializeComponent()
  {
      this.myContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
      this.myContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
      this.myToolStripMenuItem1,
      this.myToolStripMenuItem2});
      this.myContextMenu.Name = "myContextMenu";
      this.myContextMenu.Size = new System.Drawing.Size(158, 92);
  }
  </code></pre>
  
  <p><strong>Update</strong>
  The control iteration happens in a base class from which all forms in my application derive.</p>
  
  <p>There is a private components object that the myContextMenu is added to. I imagine this is there so you can see the context menu in design view when it's not attached to a control. Perhaps I could leverage this?</p>
  
  <pre><code>private System.ComponentModel.IContainer components = null;
  
  this.myContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
  </code></pre>