Click here to Skip to main content
15,886,795 members
Articles / Desktop Programming / Windows Forms

Easily Add a Ribbon into a WinForms Application

7 Aug 2019Ms-PL2 min read 2.3M   38.1K   618   655
Easily add a ribbon to a WinForms application

Style 2007

Image 1

Style 2010

Image 2

Style 2013

Image 3

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

How to Use this Ribbon Control

The ribbon class library can be added via Nuget. Right click your project and go to "Manage Nuget Packages..."

Image 4

Search "RibbonWinForms" and install the nuget package.

Image 5

Drag the ribbon control into the form.

Image 6

Click "Add Tab".

Image 7

Click "Add Panel".

Image 8

Showing the commands of the "Panel":

Image 9

Click the command and add the controls you want.

Image 10

Changing the icon and button text label.

Image 11

Adding the "Click" event.

Image 12

Type the commands that you wish to do in the event block.

Image 13

Now, try run the application.

Image 14

Example of using RibbonForm style.

Image 15

Replace the inheritance of "Form":

Image 16

to "RibbonForm".

Image 17

Note

Some behaviour of "RibbonForm" might not be working properly in some unknown circumstances. We recommended that you to perform the test in your environment before delivering your application into production.

Alternative Ribbon Control

Windows Ribbon Framework
https://docs.microsoft.com/en-us/windows/win32/windowsribbon/-uiplat-windowsribbon-entry 
Support Windows 7 onwards

Krypton WinForms components for .NET
https://github.com/ComponentFactory/Krypton

RibbonLib
https://github.com/ennerperez/RibbonLib 
https://www.nuget.org/packages/RibbonLib

Windows Ribbon for WinForms
https://github.com/ennerperez/RibbonLib 
http://blogs.microsoft.co.il/arik/2010/11/08/windows-ribbon-for-winforms-v26-released/ 
http://www.codeproject.com/Articles/55599/Windows-Ribbon-for-WinForms-Part-0-Table-of-Conten

Ribbon by Juan Pablo G.C.
http://www.codeproject.com/Articles/18449/An-easy-way-to-add-a-Ribbon-Panel-Office-2007-styl 
http://www.codeproject.com/Articles/19044/The-new-RibbonForm-RibbonRoundButton-and-FastMenu

History

  • 8th August, 2019: Publish Nuget Package, several bug fixes
  • 12th April, 2012: Initial version

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Product Manager
United States United States
- I've been programming Windows and Web apps since 1997.
- My greatest concern nowadays is product, user interface, and usability.
- TypeScript / React expert

@geeksplainer

Written By
Software Developer
Other Other
Programming is an art.

Written By
Software Developer (Senior)
Austria Austria
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
Software Developer (Senior)
United States United States
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.

Written By
Software Developer (Senior)
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
AnswerRe: minimized ribbon Pin
toATwork7-Feb-13 22:24
toATwork7-Feb-13 22:24 
AnswerRe: minimized ribbon Pin
toATwork14-Feb-13 23:59
toATwork14-Feb-13 23:59 
QuestionWindows7 64 bit with Visual Studio 2010 Not working Pin
tamilpuyal_286-Feb-13 19:42
tamilpuyal_286-Feb-13 19:42 
AnswerRe: Windows7 64 bit with Visual Studio 2010 Not working Pin
toATwork6-Feb-13 23:15
toATwork6-Feb-13 23:15 
QuestionProblem in Windows XP Pin
jintopaul 4-Feb-13 23:09
jintopaul 4-Feb-13 23:09 
AnswerRe: Problem in Windows XP Pin
adriancs5-Feb-13 13:51
mvaadriancs5-Feb-13 13:51 
AnswerRe: Problem in Windows XP Pin
adriancs5-Feb-13 14:20
mvaadriancs5-Feb-13 14:20 
BugError when loading MDI screen Pin
CorvetteGuru4-Feb-13 8:27
CorvetteGuru4-Feb-13 8:27 
I am using VB 2010, Ultimate... and all of a sudden, when I try to edit the form I get some unknown load error. At one point, windows32.dll (I think), was blamed, but it keeps coming back.

I can edit the form, run the program, but try to load the graphical portion of the screen. kaboom!

I added a couple of tabs, then ribbon panels and then buttons, ever since... this blasted load error.

I downloaded the Jan 13 build... and it was working great until today. I also restarted my computer with little success - Dell Precision T3500.

Any ideas?

Andy
GeneralRe: Error when loading MDI screen Pin
adriancs5-Feb-13 13:53
mvaadriancs5-Feb-13 13:53 
GeneralRe: Error when loading MDI screen Pin
CorvetteGuru8-Feb-13 13:43
CorvetteGuru8-Feb-13 13:43 
GeneralMy vote of 5 Pin
ccdn3-Feb-13 23:02
ccdn3-Feb-13 23:02 
GeneralRe: My vote of 5 Pin
supernorb8-Feb-13 17:00
supernorb8-Feb-13 17:00 
QuestionTag of RibbonItem, RibbonPanel and RibbonTab Pin
ccdn3-Feb-13 22:28
ccdn3-Feb-13 22:28 
AnswerRe: Tag of RibbonItem, RibbonPanel and RibbonTab Pin
toATwork4-Feb-13 2:31
toATwork4-Feb-13 2:31 
AnswerRe: Tag of RibbonItem, RibbonPanel and RibbonTab Pin
ccdn5-Feb-13 4:48
ccdn5-Feb-13 4:48 
SuggestionRe: Tag of RibbonItem, RibbonPanel and RibbonTab Pin
toATwork7-Feb-13 22:38
toATwork7-Feb-13 22:38 
QuestionFacing an issue while build or run. Pin
jintopaul 3-Feb-13 18:02
jintopaul 3-Feb-13 18:02 
QuestionRe: Facing an issue while build or run. Pin
toATwork4-Feb-13 23:51
toATwork4-Feb-13 23:51 
AnswerRe: Facing an issue while build or run. Pin
jintopaul 12-Feb-13 22:08
jintopaul 12-Feb-13 22:08 
QuestionRe: Facing an issue while build or run. Pin
toATwork12-Feb-13 22:09
toATwork12-Feb-13 22:09 
QuestionSplitDropDown in QuickAccessToolbar Pin
ccdn29-Jan-13 22:27
ccdn29-Jan-13 22:27 
AnswerRe: SplitDropDown in QuickAccessToolbar Pin
toATwork1-Feb-13 4:09
toATwork1-Feb-13 4:09 
GeneralRe: SplitDropDown in QuickAccessToolbar Pin
ccdn3-Feb-13 21:40
ccdn3-Feb-13 21:40 
BugOrb Menu Items not working Pin
Member 888448828-Jan-13 8:21
Member 888448828-Jan-13 8:21 
GeneralRe: Orb Menu Items not working Pin
toATwork1-Feb-13 3:13
toATwork1-Feb-13 3:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.