Skip to main content
A newer version of this page is available. .

Ribbon Form

  • 4 minutes to read

RibbonForm extends regular Form with Ribbon integration and skins support.

RibbonForm - Overview

A Ribbon Form is an object of the RibbonForm class, which is a descendant of the XtraForm and thus, shares most of its features like glow or shadow effects. However, unlike XtraForms, Ribbon Form borders and title bar are always skinned.

Add Ribbon Forms to the Project

The fastest way to start a project with a RibbonForm as your main form is to utilize UI-ready DevExpress templates. All templates that implement a Ribbon-based UI utilize Ribbon Forms.

OfficeInspired - Project Templates

To add new Ribbon Forms, right-click your project in Visual Studio’s Solution Explorer window and select “Add DevExpress Item | New Item…”. This will invoke the Template Gallery with new item templates. Select “Ribbon Form”, enter the form name and click “Add Item”.

XtraForm - Add New Item

Convert Standard Forms to Ribbon Forms

To replace existing default forms with RibbonForms, invoke form smart-tags and select the “Convert to Ribbon Form” option. This action will also add RibbonControl and RibbonStatusBar controls to your form if it does not yet contain them.

ILA - Form Smarttag

To do the same in code, simply change the base class from which your form derives from System.Windows.Forms.Form to DevExpress.XtraBars.Ribbon.RibbonForm. You will also need to add the DevExpress.XtraBars library to your project.


using DevExpress.XtraBars;

namespace DXApplication1 {
    public partial class Form1 : RibbonForm {
        public Form1() {
            InitializeComponent();
        }
    }
}

Compound Form Captions

By default, a Ribbon Form’s title is a text string assigned to the RibbonForm.Text property. The RibbonControl provides two string properties to override this default title: RibbonControl.ApplicationCaption and RibbonControl.ApplicationDocumentCaption. The first property stores the constant form caption, while the second can be modified in code to display the title of the currently selected MDI document.

RibbonForm - Compound Captions

Both title strings can be customized with the help of the RibbonAppearances.FormCaption and RibbonAppearances.FormCaptionForeColor2 properties. To utilize them, add the DefaultBarAndDockingController to your form and access the required properties through the BarAndDockingController.AppearancesRibbon property.


defaultBarAndDockingController1.Controller.AppearancesRibbon.FormCaption.ForeColor = Color.LightGray;
defaultBarAndDockingController1.Controller.AppearancesRibbon.FormCaptionForeColor2 = Color.Lime;

Increased Border Width

Enable the WindowsFormsSettings.FormThickBorder or WindowsFormsSettings.MdiFormThickBorder property to enlarge Ribbon Form borders and broaden the resize area. Note that these settings affect all XtraForms and RibbonForms in the application.

Enlarged borders make it easier for users to resize forms when shadow\glow effects are off, and the default form resize area is too slim.

Embedding the Ribbon Quick Access Toolbar

If you opt for the Quick Access Toolbar being located above its parent Ribbon, this toolbar will be shown right within the Ribbon Form’s title bar.

RibbonForm - QAT

Embedding the Status Bar

Apart from the RibbonControl, the Ribbon Form integrates with the RibbonStatusBar control perfectly well. A status bar can also display a size grip element, which end-users can drag to resize your Ribbon Form in both directions.

RibbonForm - Status Bar and Size Grip

Interaction with the BackstageView Control

A BackstageView Control represents the main application menu for any Ribbon, whose RibbonControl.RibbonStyle is not set to “Office2007”. The backstage menu has its own styles, to change them utilize the BackstageViewControl.Style property.

In the Office 2010 style, a backstage menu leaves the form’s title bar and ribbon page headers visible.

RibbonForm - BS2010

In the Office 2013 style, a BackstageView control occupies the entire form. Depending on the BackstageViewControl.BackstageViewShowRibbonItems property value, in this style, a backstage menu can show the Ribbon Form title, form buttons and Ribbon page header items on its surface.

RibbonForm - BS2013

Ribbon Display Mode Selector

When a Ribbon Control is in the “Office 2013” style, the Ribbon Form displays an additional button next to the standard Minimize, Maximize and Close buttons. Upon clicking, this button pops up a menu with available display modes for the Ribbon Control. Using this menu, a user can switch the Ribbon to a full-screen mode or minimize Ribbon pages, leaving only their tab headers visible.

RibbonForm - Display Mode Selector

To hide this button, disable the RibbonControl.ShowDisplayOptionsMenuButton property.

Aero Support

For Windows Vista and 7, Ribbon Forms provide built-in support for the Aero Glass effect. If your application runs on one of these operating systems and the Aero effect is enabled in system settings, the form title bar and borders will be semi-transparent, as shown below.

RibbonForm - Aero

To disable this effect even if the operating system has the Aero interface on, set the RibbonForm.AllowFormGlass property to DefaultBoolean.False. In this case, form borders and title bars will be painted according to the currently selected skin.