Taher
Taher

Reputation: 593

C# Ribbon Control for WinForm from scratch

This may seem to be a duplicate question but I searched all over the web to find a post or article about creating a ribbon control for C# Win Form Application not for Excel (MS office) I tried to follow a tutorial in some other site and my project yields lots of error is there any tutorial on how to create a ribbon from scratch ?

Upvotes: 0

Views: 4216

Answers (2)

Flydog57
Flydog57

Reputation: 7111

Looking around the web, most people point to this as the best one: Archived CodePlex project "Windows Ribbon for WinForms". Microsoft never added a "blessed" ribbon control to Windows Forms. There really hasn't been any work done on Windows Forms since the 2005 (Whitbey) time-frame (which predates the Office Ribbon).

Oddly, they did a major release of MFC in 2008 that included a ribbon system - go figure. That was the only work they've done to MFC since about 1998.

Upvotes: 1

Zachary Watson
Zachary Watson

Reputation: 48

You could create a ribbon control by creating a custom usercontrol. Go to your project, and right click, select add -> new item -> usercontrol (be sure it's for Windows Forms). Then, what you could do is add a TabControl to the designer area in Visual Studio (or instantiate it if you're making it from scratch). Then, for each tab, you could add all of the controls you need. As for coloring the tabs, if you are trying to style the ribbon like in MS Office products, here is a link to a StackOverFlow post on this topic: Set TabPage Header Color (be sure to see what the answer below the correct answer says if you have trouble). Aside from the coloring of the tabs, you could add then add the usercontrol to the form. If you don't need the ribbon to be reusable, you don't even have to make it a usercontrol--you could simply add a tabcontrol directly to the form you need a ribbon on.

Upvotes: 1

Related Questions