-
Notifications
You must be signed in to change notification settings - Fork 19
Preview the Ribbon
harborsiem edited this page Sep 1, 2020
·
4 revisions
Before we get into the details, let’s build and preview the project. Choose "Project | Build (Ctrl F9)" or click the Build button on the toolbar. The RibbonTools will now perform the following steps:
- Save the ribbon project to an XML file (RibbonMarkup.xml in this example).
- Call the Microsoft Ribbon Compiler (UICC.exe) to compile this XML file into a binary version (RibbonMarkup.bml), a header file (RibbonMarkup.h) and a resource script file (RibbonMarkup.rc).
- Call the Microsoft Resource Compiler (RC.exe) to compile the RibbonMarkup.rc file and all related images files into a resource file (RibbonMarkup.res).
- Call the Microsoft Linker (Link.exe) to generate a resource DLL (RibbonMarkup.ribbon).
- Convert the xml file and the generated header file (RibbonMarkup.h) to a C# or Visual Basic (VB) source file (RibbonItems.Designer.cs or RibbonItems.Designer.vb). One of these files will be used later in your project to access the ribbon commands and controls in the code behind. The output of these processes will be shown at the bottom of the screen in the Output window. If all steps succeed, you can now press the Preview button on the toolbar. The RibbonTools will open the generated resource DLL and use it to create a preview form:
Not bad for about a minute work. With the preview form, you can test the ribbon and the application menu. Of course, nothing will happen when you press any ribbon buttons, but it will give you good idea of what the ribbon will look like in your application. The preview form also contains 4 tabs with which you can test the following functionality:
- Application Modes: you can specify multiple application modes for your ribbon (we will come back to this in more detail in an other Wiki page). For example, WordPad has two application modes: the standard mode (mode 0) and a Print Preview mode (mode 1). The Print Preview mode is activated in WordPad when you select Print Preview from the application menu. You can activate Print Preview mode in the preview form by checking Application Mode 1 and unchecking Application Mode 0. Try it and see what happens.
- Contextual Tabs: you can specify contextual tabs for your ribbon (again, more details in an other Wiki page). Contextual tabs are a set of ribbon tabs that only appear in specific contexts. For example, in Word 2007/2010, a set of "Table Tools" contextual tabs will appear when you select a table in a Word document. WordPad does not have contextual tabs, so you cannot test them here now. However, if you design a ribbon with contextual tabs, you would be able to activate and deactivate those tabs here.
- Context Popups: you can declare several context popups in your ribbon document (more details in an other Wiki page). A context popup can contain a mini toolbar, a context menu or both. WordPad has 3 different context popups, depending on what is selected in the document. You can test these popups here. Just select the popup you want to see and it will pop up. Note that WordPad does not use any mini toolbars, just context menus.
- Colorize: The Ribbon Framework allows you to colorize the ribbon any way you want. Not just using the Blue, Black and Silver themes that you may know from MS Office. This tab allows you to experiment with different color schemes or create your own. Now, we will show you how this ribbon has been designed. Close the preview window and go to the next page Specifying Ribbon Commands.
-
Basics
- Introduction, Background on the windows ribbon
- Basic Ribbon Wrapper Basic .NET wrappers for windows ribbon.
- Quickstart Tutorial
- First WinForms Ribbon Application How to create an empty WinForms application with ribbon support.
-
Working with Ribbon Controls
- Application Menu with Buttons How to use the ribbon application menu.
- Application Menu with SplitButton and DropDownButton How to use the ribbon application menu with ribbon split button and ribbon dropdown button controls.
- Tabs, Groups and HelpButton How to use ribbon tabs, groups and the ribbon help button control.
- Spinner How to use the ribbon spinner control.
- ComboBox How to use the ribbon combo box control.
- DropDownGallery, SplitButtonGallery and InRibbonGallery How to use the ribbon drop down gallery, split button gallery and in ribbon gallery controls.
- CheckBox and ToggleButton How to use the ribbon check box and toggle button controls.
- DropDownColorPicker How to use the ribbon drop down color picker control.
- FontControl How to use the ribbon font control.
- ContextualTabs How to work with ribbon contextual tabs.
- ContextPopup How to work with ribbon context popup.
- RecentItems How to work with ribbon recent items control.
- QuickAccessToolbar How to work with the ribbon quick access toolbar.
- The Ribbon Class How to work with the ribbon class. Methods, Properties, Events
- EventLogger Since Windows 8: Logging ribbon events
- UICollectionChangedEvent How to work with the ChangedEvent in an IUICollection
-
Working with miscellany Ribbon features
- ApplicationModes How to work with ribbon application modes.
- SizeDefinition How to define custom size definitions for ribbon group elements.
- Localization How to localize a ribbon.
- Changing Ribbon Colors How to change the ribbon colors.
- Working with Images How to work with images in the ribbon.
- Use Ribbon as External DLL How to load ribbon resources from external DLLs.
- Wrapper class RibbonItems An auto generated wrapper class from the ribbon markup.
-
Designing, building, previewing Windows Ribbon with RibbonTools
- RibbonTools basics Settings, Command line, ...
- Create a new project Create a WordPad sample project
- Preview the Ribbon
- Specifying Ribbon Commands
- Designing Ribbon Views
- Convert Images to Alpha Bitmaps
-
Modeling Guidelines
-
How to ...