title: How to get the name of a component object which doesn't support the .Name property
body: <p><code>MenuItem</code> and <code>ColumnHeader</code> are not derived from <code>Control</code>. In the full framework they have their own <code>.Name</code> property, but in the compact framework they don't. In Visual Studio the form designer shows a <code>(Name)</code> and of course I can access that object using this name in code. But how can I get that name as string at runtime? Is it possible somehow, maybe by an extension method which returns the name?</p>
  
  <p>Background is that I am creating multi language windows mobile applications, and to find the text for all items on a form, I use the name of the control as identifier.</p>
  
  <p><a href="http://www.codeproject.com/Articles/16091/User-Interface-Localization-with-the-Compact-Frame" rel="nofollow">Here</a> is someone with the same problem and his solution, but I don't like it because of the additional effort to enter all names a second time in code (and also maintain them on changes), after they were already entered visually in the designer. I had to do it for many existing MenuItems and ColumnHeaders...</p>
  
  <pre><code>this.AddMenuToDictionary(this.menuItemOpen, "menuItemOpen");
  this.AddMenuToDictionary(this.menuItemExit, "menuItemExit");
  </code></pre>
  
  <p>If there is really no better solution than using such a dictionary, at least I would like to fill it without hard coded strings. Can I do this during initialization of the form using reflection?</p>