Microsoft Ribbon for WPF Released

Original author: Pete Brown
  • Transfer
I am pleased to inform you of the release of the final version of Microsoft Ribbon for WPF.

The new control is compatible with WPF 3.5 SP1 and WPF 4. It is not a wrapper over unmanaged code, but is entirely written in WPF, which means full compatibility with WPF style management capabilities.

Application template

The installer contains the new WPF Ribbon Application application template for Visual Studio.

After creating and starting a new project, you will see a blank for your tape.

Here is the XAML code for this tape:



                 Label="Button1" />
                 Label="Button2" />
                 Label="Button3" />
                 Label="Button4" />


* This source code was highlighted with Source Code Highlighter.

A window containing a ribbon inherits from the RibbonWindow class. This class allows you to work with the window's title area (which is not part of ClientArea and is not available for rendering in a regular Window - approx. Transl.) And display controls such as, for example, a quick access panel and contextual tab titles. You can not use this class, but in this case, you will not be able to work with the window title.

The new ribbon contains all the features that you expected to find in it: a quick access panel, application menus, auxiliary panels, advanced tooltips, keyboard shortcuts, automatic resizing and location, tabs, contextual tab headers, aero support, etc. P.

Context Tabs

Let's add a new tab and put it in a group of contextual tabs (such as, for example, table editing tools in Word). You need to add the following code to the XAML feed:

         ContextualTabGroupHeader="Awesome Tools"
         Header="Really Awesome">
               Label="Button21" />

                   Background="Green" />

* This source code was highlighted with Source Code Highlighter.

Pay attention to the changes in the window code to support the title of the context group.

Quick Access Toolbar

As you expected, the ribbon supports the quick access toolbar. XAML Code:

               Label="ButtonQ1" />
               Label="ButtonQ2" />
               Label="ButtonQ3" />

* This source code was highlighted with Source Code Highlighter.

The screenshot shows two quick access buttons and a double arrow, indicating that a few more buttons are available.

The WPF Ribbon development team has done a great job in creating this control. It supports additional scenarios needed when using it in a wide range of tasks. There is also full support for the style of Windows 7 user interfaces. It's nice to see that WPF Ribbon is released and available for use in your projects.

PS And yes: RibbonButton supports ICommand)


Also popular now: