Partager via


What's this new GenerateMember property?

If you have played with Whidbey builds of Visual Studio, you may have noticed this new property called GenerateMember that shows up in the property grid for all controls and components you add to a Windows Form. Wondering what it is about? It is actually a design time extender property that allows you to control whether a component added to the form is referenced by a member variable in the class or a local variable in InitializeComponent. By default, it is set to true, but if you have any components that you are not really referencing outside of InitializeComponent, you can set it to false. That way you can limit the member variables in your class to only the components you really need member variables for - just something to prevent clutter.

This is just one of those little features that many will probably not notice, but those that do might find very convenient!

Comments

  • Anonymous
    July 03, 2004
    Will this work with other root designers as well, such as VG.net?

    Actually I think VG.net is the only other commercial root designer. It is at www.vgdotnet.com
  • Anonymous
    July 08, 2004
    Yes, I believe it will.