Click here to Skip to main content
15,867,308 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

 
QuestionButtonMore can not show in "OrbStyle = Office_2013" when MouseHover in ButtonMore area Pin
Nguyễn Văn Lượng25-Jul-15 6:15
Nguyễn Văn Lượng25-Jul-15 6:15 
QuestionHow to add spacing between ribbon button Pin
Sujeet Bhujbal19-Jul-15 8:52
Sujeet Bhujbal19-Jul-15 8:52 
QuestionProblem: InvokeRequired -Property does not exist for ribbonbutton Pin
Info_Power30-Jun-15 22:51
Info_Power30-Jun-15 22:51 
AnswerRe: Problem: InvokeRequired -Property does not exist for ribbonbutton Pin
toATwork30-Jun-15 22:54
toATwork30-Jun-15 22:54 
GeneralRe: Problem: InvokeRequired -Property does not exist for ribbonbutton Pin
Info_Power1-Jul-15 0:33
Info_Power1-Jul-15 0:33 
QuestionError checking at Unhook Pin
Souzagil14-Jun-15 14:57
Souzagil14-Jun-15 14:57 
QuestionHow do i hide OrbDropDown menu Pin
Member 117516898-Jun-15 22:58
Member 117516898-Jun-15 22:58 
AnswerRe: How do i hide OrbDropDown menu Pin
ecureuill28-Oct-15 9:54
ecureuill28-Oct-15 9:54 
Are you archive it?
I'd like to show the orb, but disable the "click"
Questionproblem in button.text in ribbon tabs Pin
Info_Power8-Jun-15 4:03
Info_Power8-Jun-15 4:03 
QuestionERROR OnGetDropDownBounds Pin
Souzagil6-Jun-15 10:43
Souzagil6-Jun-15 10:43 
QuestionHide Panel Caption/Text Pin
Member 1152122431-Mar-15 0:45
Member 1152122431-Mar-15 0:45 
AnswerRe: Hide Panel Caption/Text Pin
Member 115212249-Apr-15 11:25
Member 115212249-Apr-15 11:25 
GeneralRe: Hide Panel Caption/Text Pin
Member 1152122414-Apr-15 17:18
Member 1152122414-Apr-15 17:18 
Questionproblem with RibbonTabs Pin
Info_Power26-Mar-15 23:27
Info_Power26-Mar-15 23:27 
QuestionRe: problem with RibbonTabs Pin
toATwork26-Mar-15 23:28
toATwork26-Mar-15 23:28 
AnswerRe: problem with RibbonTabs Pin
Info_Power29-Mar-15 22:10
Info_Power29-Mar-15 22:10 
GeneralRe: problem with RibbonTabs Pin
Rudy1234522-Apr-15 20:47
Rudy1234522-Apr-15 20:47 
GeneralRe: problem with RibbonTabs Pin
Info_Power4-Jun-15 23:36
Info_Power4-Jun-15 23:36 
QuestionHow to change style 2007 to 2010? Pin
Member 1153734019-Mar-15 15:18
Member 1153734019-Mar-15 15:18 
AnswerRe: How to change style 2007 to 2010? Pin
toATwork19-Mar-15 20:54
toATwork19-Mar-15 20:54 
QuestionUnable to edit any style without spending hours !! why cannot edit say the font familty of a ribbon panel Pin
Alejandro Barrada25-Dec-14 5:57
Alejandro Barrada25-Dec-14 5:57 
AnswerRe: Unable to edit any style without spending hours !! why cannot edit say the font familty of a ribbon panel Pin
adriancs25-Dec-14 12:14
mvaadriancs25-Dec-14 12:14 
GeneralRe: Unable to edit any style without spending hours !! why cannot edit say the font familty of a ribbon panel Pin
harsini14-Aug-15 21:53
harsini14-Aug-15 21:53 
QuestionRibbonTextBox - Lost Focus? Pin
colkaih6-Dec-14 4:14
colkaih6-Dec-14 4:14 
QuestionNot working... Pin
Adrian Andrei24-Nov-14 23:01
Adrian Andrei24-Nov-14 23:01 

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.