Content
How to Use - Step by Step Guide for Beginner
Reminder: Please note that this ribbon does not work on
.Net 3.5 Client Profile and
.NET 4.0 Client Profile. You have to manually 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?)
Note: The above warning is not applicable if you are using .NET Framework 2.0.
Lets start1. Download the pre-compile DLL
System.Windows.Forms.Ribbon35.dll.
2. Create a blank WinForms project.

3. Add Ribbon into Visual Studio Toolbox. Right Click on
Toolbox >
Add Tab.

4. Give the new born baby... no, I mean the tab... a name, how about calling it "
Ribbon".

5. Right Click on the New Tab
Ribbon > Choose Items...

6.
Browse... Where are you? System.Windows.Forms.Ribbon35.dll?

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

8. 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.

9. And finally, what you're going to do is just...
Another WayManually code it behind.10. 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.
Open
Form.Designer.cs and add these three lines of code:
private System.Windows.Forms.Ribbon ribbon1;
ribbon1 = new System.Windows.Forms.Ribbon();
this.Controls.Add(ribbon1);
Into Form1.Designer.cs:
private void InitializeComponent()
{
ribbon1 = new System.Windows.Forms.Ribbon();
this.components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Text = "Form1";
this.Controls.Add(ribbon1);
}
private System.Windows.Forms.Ribbon ribbon1;
Save and
Close Form1.Designer.cs.
Double click and open
Form1.cs, and now the Ribbon control is added into the main form.
Lets continue...11. Click on the Ribbon and click Add Tab.

12. Click on the newly added RibbonTab, then click Add Panel.

13. Click on the newly added RibbonPanel, go to Properties. You will see a set of available controls that can be added to the RibbonPanel.

14. You might not able to see the extra command links of "Add Button", "Add ButtonList", "Add ItemGroup"... etc at the Properties Explorer.

15. Right click at the Properties Explorer and Tick/Check the
Commands.

16. Try to add some buttons into the RibbonPanel.
17. Click on the RibbonButtons, go to Properties. Let's try to change the image and the label text of the button.

18. This is how your ribbon looks like now. Now, create the click event for the buttons. Click on RibbonButton, go to Properties, modify the Name of the button.

19. Click on the RibbonButton, go to properties > Click on Events > Double Click on event of Click.

20. Events created.
public Form1()
{
InitializeComponent();
}
void cmdNew_Click(object sender, EventArgs e)
{
MessageBox.Show("Button \"New\" Clicked.");
}
void cmdSave_Click(object sender, EventArgs e)
{
MessageBox.Show("Button \"Save\" Clicked.");
}
21. Press F5 to run the application. Done.

22. You might want to inherit your Main Form into a RibbonForm to have extra features. Such as:
Note: In the previous version of Ribbon, Inherit the Main Form to RibbonForm might cause some compatibility problems with some of the System.Windows.Forms controls. However this problem is solved in the released version of 10 May 2013.23. In the code for
Form1.cs, change this line:
public partial class Form1 : Form
24. to this line:
public partial class Form1 : RibbonForm