RibbonFormNavigationControlLayoutMode Enum
Lists values that specify the alignment of the side navigation relative to the Ribbon Form’s title.
Namespace: DevExpress.XtraBars.Ribbon
Assembly: DevExpress.XtraBars.v25.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Members
Name | Description |
---|---|
Default
|
The navigation control stretches from the top to the bottom of the form (full height). |
StretchToTop
|
The navigation control stretches from the top to the bottom of the form (full height). |
StretchToFormTitle
|
The navigation control starts below the form’s title and extends to the bottom of the form. |
Related API Members
The following properties accept/return RibbonFormNavigationControlLayoutMode values:
Remarks
Use the NavigationControlLayoutMode property to align the side navigation relative to the Ribbon Form’s title.
The following code snippet creates a side navigation inspired by the new Microsoft Outlook:
using DevExpress.XtraBars.Navigation;
using DevExpress.XtraBars.Ribbon;
using System.Windows.Forms;
namespace DXApplication {
public partial class Form1 : RibbonForm {
AccordionControl accordion;
public Form1() {
InitializeComponent();
accordion = new AccordionControl() { Dock = DockStyle.Left };
this.Controls.Add(accordion);
this.NavigationControl = accordion;
this.NavigationControlLayoutMode = RibbonFormNavigationControlLayoutMode.StretchToFormTitle;
CreateAccordionItems();
}
void CreateAccordionItems() {
AccordionControlElement group1 = new AccordionControlElement(ElementStyle.Group) {
Name = "group1",
Text = "Contacts",
Expanded = true
};
AccordionControlElement item1 = new AccordionControlElement(ElementStyle.Item) {
Name = "itemCustomers",
Text = "Customers",
};
AccordionControlElement item2 = new AccordionControlElement(ElementStyle.Item) {
Name = "itemEmployees",
Text = "Employees"
};
group1.Elements.AddRange(new AccordionControlElement[] { item1, item2 });
accordion.Elements.Add(group1);
}
}
}