How to use FluentDesignForm with RibbonControl?

1.3k Views Asked by At

I want to use FluentDesignForm with RibbonControl from DevExpress to realize effect illustrated in Image1, but what I actually get is Image2. The problem is that the min/max/close buttons at right top corner of FluentDesignForm are missing and I cannot move the form by dragging its title bar. Is it possible to realize the effect I want? Here is Image1: Image1 and Image2: Image2

1

There are 1 best solutions below

0
On

DevExpress did not use the FluentDesignForm for this. Their form is a RibbonForm. The inheritance tree looks like this:

DevExpress.XtraGrid.Demos.frmMain
> DevExpress.DXperience.Demos.RibbonMainForm
> DevExpress.XtraBars.Ribbon.RibbonForm
> DevExpress.XtraEditors.XtraForm
> DevExpress.XtraEditors.MouseWheelContainerForm
> DevExpress.XtraEditors.DForm
> System.Windows.Forms.Form

The RibbonForm has no control box and is supposed to be used with a RibbonControl handling this.

On the left side, they use a custom control derived from the AccordionControl:

DevExpress.DXperience.Demos.NavigationControl
> DevExpress.XtraBars.Navigation.AccordionControl
> DevExpress.XtraEditors.BaseStyleControl
> DevExpress.XtraEditors.BaseControl
> DevExpress.Utils.Controls.ControlBase
> System.Windows.Forms.Control

Their trick is to put their NavigationControl (aka AccordionControl) directly onto the RibbonForm and override the accordion's method GetUseDirectCompositionStyle() to return true (without checking for DirectX and stuff).