Context: I am creating mock-ups for a web based application. I use WinForms Application to do this. In the future I will use WebForms but this question applies to both I'm sure.
Question: I have panels that are transparent which I place over a webpage-sized picturebox. The panels act as clickable "links" to "navigate" to "pages".
In actuality when a panel is clicked the picturebox (which serves as the background) changes to a screen capture of a different webpage giving the appearance of web navigation. The panels act as masks on things users click on to navigate.
I would like to add these existing panels into a list for the purpose of changing them. For example, I would like to change their .Enabled attribute set to false; in one statement.
I currently accomplish this by doing this:
public void TurnOffPanels()
{
aPnl.Enabled = false;
bPnl.Enabled = false;
cPnl.Enabled = false;
dPnl.Enabled = false;
ePnl.Enabled = false;
fPnl.Enabled = false;
{
My question is: how can code this using a list of my panels?
PS: This is my first question here so please feel free to berate me for format, noobness...whateves