Part 1: Background

The ribbon that is going to be used in this article is an open source project created by Jose Menendez Poo. However, the original author of the ribbon has stopped support of it. A group of fans of this ribbon re-host and continue to develop/enhance and support the ribbon.

The original ribbon creator has posted an article explaining what this ribbon is all about at here: [A Professional Ribbon You Will Use (Now with orb!)]. However, that article doesn't describe how to use it in your project. Therefore, this article will show how to use it.

Part 2: How to Use this Ribbon Control

Reminder: Please note that this ribbon does not work on .Net 3.5 Client Profile and .NET 4.0 Client Profile. You have to switch the target framework to .NET 3.5 or .NET 4.0. When you first create a project, Visual Studio might initially set the target framework to Client Profile.

If the project is using Client Profile, you might receive this error while you are trying to build the solution:

Error 3 The type or namespace name 'Ribbon' does not exist in the namespace 'System.Windows.Forms' (are you missing an assembly reference?)

1. Get System.Windows.Forms.Ribbon35.dllfrom download.

2. Create a blank WinForms project.

3. Add Ribbon into Visual Studio Toolbox.

Right Click on Toolbox > Add Tab.

Give the new tab a name "Ribbon".

Right Click on the New Tab [Ribbon] > Choose Items...

[Browse...] Where are you? System.Windows.Forms.Ribbon35.dl?

There you are... Gotcha... Select it...

Only [Ribbon] can be dragged into Form. Others, as the picture below said, they are not needed to exist in toolbox. However, its not going to harm your computer or project if you select all the items belongs to ribbon (by default). Its up to you.

And finally, what you're going to do is just...

Another Way

Manually code it behind.

You can add the ribbon into WinForm too with code behind.

Add a reference of System.Windows.Forms.Ribbon35.dll into your project. Build the the solution.

15. You might want to inherit your Main Form into a RibbonForm to have extra features. Such as:

Note: Inherit the Main Form to RibbonForm will have some compatibility problems with some of the System.Windows.Forms controls. (especially MDI Client Control)This problem is solved in released version 10 May 2013.

16. In the code for Form1.cs, change inheritance of Form this line:

publicpartialclass Form1 : Form

to RibbonForm

publicpartialclass Form1 : RibbonForm

Part 3: Caution While Using With Visual Studio 2010

... deleted ....

Part 4: Using this Ribbon with an MDI Enabled WinForm

The following guide will show how to apply this ribbon with an MDI (Multi Document Interface) enabled WinForm.

Note: In previous version of Ribbon, inheritance of RibbonForm is not supported well with MDI Enabled WinForm. This problem is solved in released version of 10 May 2013.

Start

1. Lets design a ribbon winform something like this as example. In the properties window, set IsMdiContainer to True.

2. Create another simple another form that will be loaded into the MDI Container of MainForm.

Part 5: Alternative Ribbon

Part 6: How to Make a New Theme, Skin for this Ribbon Programmatically

Default Theme

Example color theme of RibbonProfesionalRendererColorTableBlack.cs (ready made by ribbon author).

Another custom theme

Note: A Theme Builder is included in the Demo App, you can obtain it at Download. You can Build new Theme easily with Theme Builder. In new released, Ribbon (13 Jan 2013), Ribbon can write and read a theme file. Read more: How to Create and Load Theme File.

To make your own color theme, create another class and inherit RibbonProfesionalRendererColorTable.

Lead Software Engineer on a paperless office / workflow system. I specialize in building custom user controls and components that are using in my everyday software. I've also worked with Neural Networks for character recognition on documents in my paperless office software.

Just as a guide for those of us out there who are interested in incorporating this Ribbon control into a Visual C# Windows Form application in Visual Studio 2012 (as I have done, and ran into errors ):

In attempting to include this ribbon into a Windows Forms Application in Visual Studio 2012, the Forms Designer may throw an exception, so please do the following:

1. Following step 2 of this wonderful tutorial (on referencing System.Windows.Forms.Ribbon.dll in a Windows Forms project designed in Visual Studio), right click on the file Form1.cs and choose the option < > View Code (to open as a script in Visual Studio) and include the following line of code:

using System.Windows.Forms.Ribbon;

It seems to be important to include the above line of code, as Visual C# doesn't appear to be able to infer that you are declaring the newly-referenced and downloaded resource (System.Windows.Forms.Ribbon.dll) for use in this project.

2. If your Properties dock doesn't include options for Add Tab, etc (as depicted in Part 2 of the article above), right click on an option in the Properties panel and check the Commands option in the pop-up balloon.

Exception of type 'System.ComponentModel.Design.ExceptionCollection' was thrown.

When I do uncomment the above C# code in Form1.cs, the exception was not thrown, but an error appeared in the Forms Designer though. The error was:

The designer loader did not provide a root component but has not indicated why.

Ignoring this message (& proceeding to continue) resulted in the following warning:

Object of type 'System.String' cannot be converted to type 'System.Drawing.Image'.

No reference line/file was provided as to the origin of this error. It's peculiar, but it seems that these errors appear when using .NET 3.5 Framework. Any comments to alleviate this problem would be much appreciated.

I've modified the flie GlobalHook.cs as per your instructions above & although the application can be compiled, the Forms Designer in Visual Studio 2012 still throws exceptions and is unable to display the Form as stipulated by the code in Forms1.Designer.cs.

Please advise if you are able to view the Form as it is (with panels, etc where these are included) without any exceptions being thrown, after the form has been saved, closed and reopened in Visual Studio 2012.

This new download seems to work well (even with .NET Framework 4.5) with the only problem being that inheritance of the Main Form into RibbonForm in Form1.cs does not seem to display in the Forms Designer, but appears when compiled.

Please upload the corresponding classes as well. I've visited the Source Code section for the link you've provided, but the source for the updated version (i.e. this DLL file) is not available for download.

That's interesting, because I ran into a few exceptions using this control in Visual Studio 2012. Please see my response to Member 9292729 previously for details on these error messages (& their potential circumvention).

Please advise if there might be anything which I have not done and which may be essential for this control to work. Thanks.

I'm not able to do that too.
I solve this by creating a hidden menustrip. Add some hidden menu item into the menustrip.
Then assign short-cut key to the menu items.
Redirect the code execution to the functions that bind into the ribbonbuttons.

I have uploaded an example at the top of this article. You may want to check it out.

Can any one please help me, how to customize the QAT drop down item. The current control by default not working to provide the customization, and not allowing to define the drop down list to the customize button.

I like the Ribbon, but I have to programmatically add buttons to a ribbon panel. But if I do this without setting the bounds, the button is not visible (size 0;0), althoug I have set the small Image and the Image. If I set the bounds I before I add the button to the Controls-collection, I get a NullReferenceException because the parent is null. If I set the bounds after having added the button to the controls list, still the size is 0,0 and the button is not visible.

Another problem I have is that I want to programmatically preselect a comboboxbutton according to a document I have loaded (like the font size in Word). I receive an InvalidoperationException: Cross-thread operation not valid: Control 'ribbon1' accessed from a thread other than the thread it was created on.

I have tried it but I'm not able to do it too. Just like you. Sorry that I can't provide help on this matter.
The author of this ribbon had stopped supporting it.
There are many of the programmer face various problems. Yours is one of it.
As a result, a group of fans of this ribbon have gathered and re-host the project, continue to develop and provide support of it.
The new project site of this ribbon is located here:http://officeribbon.codeplex.com/[^]
You may download the latest modified version of this ribbon and seek for further help at there.

And, if you have fixed the problem, you are welcome to share it. Your fixed will be posted in the documentation.