0
kicks
Windows Ribbon for WinForms, Part 4 - Application Menu with Buttons
Before we start to use ribbon features, we must learn the basics of ribbon markup.
Commands and Views
A command is an action that is identified by a number, it can be opening the save-as dialog, printing the current document, closing the application, etc. every thing you can do in a function call.
A view is a graphical representation of [usually several] commands. It defines the type of controls used to activate the commands and their size, order and layout on screen.
So using commands and views is actually just another instance of the MVC design pattern, which allows us to separate business logic from presentation logic.
Now we will write a new WinForms application with ribbon that uses the application menu with simple buttons. We start this sample with the an empty WinForms project that already includes ribbon support (see previous post for details). On the next sections I’ll explain:
Commands part of the ribbon markup
Views part of the ribbon markup
code-behind, responding to ribbon events
As always, the entire code is available at windowsribbon.codeplex.com