Well...
1. Place the
MainMenu
on your
Form
.
2. Create the
MenuItem
s.
3. Create the first
Panel
.
4. Set its
Dock
property to
DockStyle.Fill
.
5. Place whatever
Control
s you want on it.
6. Repeat steps 3 to 5 for all the other
Panel
s.
Note: There is an issue. Since the
Panel
s are all on the same
Form
and all have
Dock = DockStyle.Fill
, only the uppermost one will be visible in the designer. But that's exactly what you want it to be, right? Ok, but you want to add some
Control
s on the invisible ones. So, right-click on the visible one and click
Send To Back. The
Panel
below will now be visible. And so on.
7. Create
Click event
handlers for your
MenuItem
s, for example:
private void menuHome_Click(object sender, EventArgs e)
{
this.panelHome.BringToFront();
}
That's all!