[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Expand]Data Grid
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Collapse]Navigation Controls
   [Expand]Accordion Control
   [Collapse]Navigation Bar
    [Collapse]Views
      View Layout Customization
      Styling View Content Elements
      Templating View Elements
      Scrolling
    [Expand]Groups
    [Expand]Items
     Binding to Data
    [Expand]Visual Elements
    [Expand]Miscellaneous
    [Expand]Member Tables
    [Expand]Examples
     Main Features
     Product Class Structure
    Office Navigation Bar
    TileNav Pane
    Tile Bar
   [Expand]Wizard Control
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

View Layout Customization

This topic describes how to customize a View's layout in the NavBar control.

Expanded Orientation of Groups and Items

You can use the NavBarViewBase.Orientation property value to specify if the NavBar's View groups are arranged vertically or horizontally.

Orientation = Vertical (Default) Orientation = Horizontal

You can use the NavBarViewBase.ItemsPanelOrientation property value to specify if the NavBar's View group items are arranged vertically or horizontally.

ItemsPanelOrientation = Vertical ItemsPanelOrientation = Horizontal

You can define a panel type (a System.Windows.Controls.Panel descendant) that should contain items within groups by creating a NavBarViewBase.ItemsPanelTemplate type template. You can also use the panel's properties to control the items' layout.

Expanded Display Mode of View Content Elements

The NavBarControl can display its groups and items as text labels, images, or images with captions. You can use the following properties to specify how the groups and items are displayed:

The properties listed in the table above use the DisplayMode.ImageAndText, DisplayMode.Image, and DisplayMode.Text options.

DisplayMode = ImageAndText DisplayMode = Image DisplayMode = Text

The code sample below demonstrates how to make the NavBar display its groups using images, and display items as images with text.

Expanded Image and Text Layout Settings

Image Settings

The NavBar control allows you to specify the dimensions and stretch mode for images displayed within groups and items.

You can pass the ImageSettings object with the image settings to the following properties to define how images are displayed within items and groups:

The code sample below illustrates how to define image settings for all the NavBar items and groups.

Layout Settings

The NavBar control allows you to specify groups' and items' layout (image and text alignment, and image docking behavior).

You pass the LayoutSettings object to the following properties to define layout settings for items and groups:

The code sample below demonstrates how to make NavBar display text under the images in its items.

Is this topic helpful?​​​​​​​