Miguel
Miguel

Reputation: 3496

Aero-Style Windows Explorer Bar for .NET

Good morning,

I am looking for a free implementation of the Windows Explorer menu bar introduced with the Aero theme back in Vista... I am talking about the bar which is just below the address bar when you open Explorer (and in case you don't have the old menu bar visible by default) that says, for instance, "Organize" or "Open Control Panel"... Is anyone aware of such a control for .NET?

Thank you very much.

Upvotes: 1

Views: 1648

Answers (1)

Patrick
Patrick

Reputation: 17973

I'm not sure that you actually need a free control when you can get the original toolstrip control to mimic the appearance pretty close.

Here's how I did it:

  1. Drag a toolstrip control to your Form
  2. Open Properties and change
    • GripStyle to Hidden,
    • RenderMode to System,
    • AutoSize to false, and
    • Set size to a larger Height, (34 is pretty close to the one in Explorer)
    • add some Padding (I chose 5 on all)
  3. Open the Items property and add a dropdownbutton and select it
    • Change DisplayStyle to Text
    • Change Text to "Organize"
    • Change AutoSize to false
    • Change the Height to 28 or something close
  4. Click OK and go to the events for the toolstrip
  5. Enter a function name for the Paint event (or just double click) and enter the code snippet below

private void toolStrip1_Paint(object sender, PaintEventArgs e) { e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(227, 239, 240)), 0, 17, toolStrip1.Width, toolStrip1.Height); }

So okay, the colors are wrong, but that's pretty close, wouldn't you agree?

Upvotes: 1

Related Questions