Create a new project - harborsiem/WinForms-Ribbon GitHub Wiki
Create a new project
Choose "File | New (Ctrl+N)" to create a new project:
The RibbonTools64 comes either with an empty ribbon document or with a WordPad template that contains a ribbon that is virtually identical to the one uses by WordPad in Windows 7 and newer Windows versions. Here we have a look to the WordPad template. Make sure to select this template at the top of the dialog box.
Next, you need to specify a directory where you want to store the ribbon file. I suggest using a subdirectory of your Visual Studio project directory. In this example, our project will be stored in the "D:\Projects\TextPad" directory, so we put the ribbon in a "Ribbon" subdirectory. You also need to specify a filename for the ribbon document. Ribbon document files are XML files. You can use any extension for the document file, but Microsoft recommends using the standard .xml extension.
When you click OK, the ribbon document will be generated and all resources (images) used by the ribbon will be copied to the "Ribbon\Res" subdirectory. This can take a couple of seconds, after which your screen will look like this:
The main area on the left of the screen is divided into 3 tabs:
- Commands: shows all the commands used by the ribbon. We will get to this in the chapter “Specifying Ribbon Commands”.
- Views: the views used by the ribbon. A view is a visual representation of a set of commands. These views include the main ribbon as well as any context popups. Views will be explained in detail starting on the page "Designing Ribbon Views".
- XML Source: the XML source of the ribbon document. This is a read-only view of the generated XML. You only need to access this tab if the ribbon compiler generates an error. The RibbonTools will try to keep you from generating invalid XML as much as possible. However, the ribbon compiler does more than checking for correctness of XML. Should the ribbon compiler generate errors, then you will see those in an error message and in the message log at the bottom of the screen. You can use the line number information to locate the error in the XML Source view. See the MSDN documentation for a description of the possible errors.