Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Collapse]Forms and User Controls
    XtraForm
    Ribbon Form
    Tabbed Form
    XtraUserControl
    Form Assistant
    Taskbar Assistant
   [Expand]Splash Screen Manager
   [Expand]Adorner UI Manager
   [Expand]Examples
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Ribbon Form

RibbonForm extends regular Form with Ribbon integration and skins support.

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.

Expanded 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.

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".

Expanded 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.

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.

Expanded 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.

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.

Expanded 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.

Expanded 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.

Expanded 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.

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.

Expanded 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.

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

Expanded 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.

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.

How would you rate this topic?​​​​​​​