RibbonForm Class
A form that supports incorporation of a RibbonControl.
Namespace: DevExpress.XtraBars.Ribbon
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
public class RibbonForm :
XtraForm,
ISupportGlassRegions,
IBarObjectContainer,
ISupportFormShadow
Remarks
A RibbonForm is the XtraForm class descendant which supports the Microsoft Ribbon interface. The form is specifically designed to display a RibbonControl; and is not displayed properly on screen without a RibbonControl.
The RibbonForm is painted differently depending on the embedded Ribbon Control’s paint style (RibbonControl.RibbonStyle). For instance, the following images show RibbonForms painted in the Office 2007 and Office 2010 styles:
Ribbon Style | Image |
---|---|
Office 2007 | |
Office 2010 |
The main features of the RibbonForm:
- The form’s title consists of two portions that allow you to specify the application’s name and the name of the active document. Use the RibbonControl.ApplicationCaption and RibbonControl.ApplicationDocumentCaption properties to specify these captions.
- In the Office 2007 paint style, the Application Button is displayed within the form’s title. In other styles, this button is displayed below the title bar. A click on the Application Button can invoke a custom dropdown control specified by the RibbonControl.ApplicationButtonDropDownControl property or supplied via the RibbonControl.ApplicationButtonClick event.
- The form is always painted using a skinning painting scheme, which by default, is specified by the BarAndDockingController.LookAndFeel property of the DefaultBarAndDockingController.
Under Microsoft Windows Vista and more recent Microsoft Windows OS, the RibbonForm supports the frame transparency feature. This is controlled by the RibbonForm.AllowFormGlass option.
To create a ribbon form in code, use the RibbonForm
class as a base class.
using DevExpress.XtraBars;
namespace DXApplication1 {
public partial class Form1 : RibbonForm {
public Form1() {
InitializeComponent();
}
}
}
Note
The RibbonForm doesn’t support the inherited RightToLeftLayout and RightToLeft properties.
Do not set the RibbonForm’s FormBorderStyle property to None.
Do not add a BarManager to a RibbonForm.
Important
When a DockManager is placed on a RibbonForm
, you may notice slow performance during control startup rendering for complex projects. To resolve the issue, call the DockManager.ForceInitialize method on form loading.
See Ribbon Form for more information.