This section provides tutorials on simulating popular application UIs using DevExpress controls.
Windows 11 UI
A user interface inspired by Windows 11 and the latest Microsoft Office versions.
Office Inspired UI
User interfaces modeled after Microsoft Office applications like Word, Excel, PowerPoint, and Visio.
Building an Office-Style UI Manually
This tutorial demonstrates the manual construction of a typical Office-inspired UI. Alternatively, the DevExpress Template Gallery can be used for similar results.
- Create a New Project: In Visual Studio, navigate to
File | New | Project(or pressCTRL+SHIFT+N). Choose the defaultWindows Forms Applicationtemplate and confirm. - Add Navigation Controls: From the Visual Studio Toolbox, add
NavigationFrame,NavigationBar, andOfficeNavigationBarcontrols to your form. - Arrange Controls: Position the controls on the form as desired.
- Configure Navigation Bar: Use the smart tag of the
NavigationBarcontrol to switch its view toNavigation Pane View. - Set Group and Page Captions: Rename the automatically generated
NavBarGroupandNavigationPagecontrols. Set their captions to "Employees" and "Customers". Assign these same strings to theTagproperty of each corresponding page for later reference.// Assign captions and tags for navigation elements navigationPage1.Tag = navBarGroup1.Caption = navigationPage1.Caption = "Employees"; navigationPage2.Tag = navBarGroup2.Caption = navigationPage2.Caption = "Customers"; - Add Content to Pages: Select different pages within the
NavigationFrameusing its chevron buttons. Place aLabelControlon each page and customize its caption. These labels help identify the pages at runtime. - Clean Up Office Navigation Bar: Access the smart tag of the
OfficeNavigationBarand remove the default "Item1" and "Item2" elements. - Bind Navigation Controls: Set the
OfficeNavigationBar.NavigationClientproperty to yourNavigationBarcontrol. This links them, and theOfficeNavigationBarwill now display elements corresponding to theNavigationBargroups. Clicking an element in theOfficeNavigationBarwill activate the associatedNavigationBargroup. - Handle Group Change Event: Implement the
NavBarControl.ActiveGroupChangedevent handler. This code switches theNavigationFrame's selected page based on theTagproperty of the page that matches the active group's caption.// Event handler to synchronize NavigationFrame page with NavBarGroup private void navBarControl1_ActiveGroupChanged(object sender, DevExpress.XtraNavBar.NavBarGroupEventArgs e) { navigationFrame1.SelectedPage = (NavigationPage)navigationFrame1.Pages.FindFirst(x => (string)x.Tag == e.Group.Caption); } - Runtime Testing: Run the application. Observe the default animation effects when swicthing pages.
- Convert to Ribbon Form: At design time, invoke the form's smart tag (rebuilding the project might be necessary) and select "Convert to Ribbon Form". This transforms the main form in to a
RibbonForm, addingRibbonControlandRibbonStatusBarControlcomponents. - Add Ribbon Items: On the
RibbonPageGroup, add aBarSubItemcontaining twoBarButtonItemelements. These buttons will allow end-users to switch between the "Employees" and "Customers"NavigationFramepages. - Implement Button Click Event: Handle the
ItemClickevent for the firstBarButtonItem. This event handler will change the activeNavigationBargroup. Combined with theActiveGroupChangedevent, this also switches theNavigationFramepage.// Event handler to activate a specific NavBarGroup private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { navBarControl1.ActiveGroup = navBarControl1.Groups.First(x => x.Caption == e.Link.Caption); } - Configure Second Button: Select the second
BarButtonItem. In the Visual Studio Properties window, locate theItemClickevent. Use the dropdown to assign the same event handler as the first button. Run the application and verify that both buttons correctly change theNavigationFramepages.
Building an Office-Style UI with the DevExpress Template Gallery
- Launch Template Gallery: In Visual Studio, go to
File | New | Project(orCTRL+SHIFT+N) and select theDevExpress Template Galleryoption. - Select Template: Choose the
Blank Applicationtemplate within the gallery and proceed. - Apply Predefined Form Template: The created project features a skinnable
XtraFormand the Layout Assistant Extension. Open the form's smart tag menu and clickPredefined Form Templates. - Choose Navigation Container: Select the
Navigation Containertemplate from theOffice Inspired UIgroup and apply it. - Run and Explore: Launch the application. Test the UI, switch themes using the in-ribbon gallery, navigate between modules via the ribbon menu or bottom navigation control, and observe the frame switching animations.
Visual Studio Inspired UI
A layout mimicking Visual Studio, featuring a tabbed or MDI workspace, side panels, and a top menu bar.
Windows Modern UI
A flat, clean, and minimalist interface inspired by Windows Store applications.
Touch-Enabled Tile UI
Applications designed for touch input, often referred to as hybrid applications, should be optimized for touch interaction. This section outlines a common application pattern and highlights suitable DevExpress controls for creating such interfaces.
Fluent Design UI
User interfaces embracing Microsoft's Fluent Design System principles.