2

I am supporting a large existing windows forms application. It makes use of panels that sit over the other content on forms. The panels have their visible property to false in the designer. At runtime, visible is set to true when appropriate to display the panel.

This system works fine. However, it's hard to maintain the forms that have these panels because the designer shows them even when they should be invisible. Here is an example:

[Imgur](http://i.imgur.com/LWO2xMp.png)

The Panel_archive has Visible set to False. However, it's still showing in the designer. This makes it hard to edit the fields that it hides.

Is it possible to hide this panel (and all its child controls) so that I can edit the stuff behind it? I assume there is a way to do this (at least, in earlier versions of the Visual Studio IDE) as the original developers created the forms like this. However, I can't find a way.

Oliver
  • 11,297
  • 18
  • 71
  • 121
  • 2
    http://stackoverflow.com/questions/9998672/winforms-how-to-show-hide-elements-in-designer – Tewr Mar 03 '14 at 16:10
  • Yes, awkward in the designer and lots of mishaps when one panel becomes the child of another. So don't use a panel, use a UserControl instead. Or use [a TabControl without tabs](http://stackoverflow.com/questions/2798215/hide-tabcontrol-buttons-to-manage-stacked-panel-controls/2798241#2798241). – Hans Passant Mar 03 '14 at 16:18

0 Answers0