[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
    [Expand]Views
    [Collapse]Groups
      Group Content Model
      Expand and Collapse Groups
      Expanded Group
      Active Group
    [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]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]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Group Content Model

This topic describes how the content of two group elements - the group header and the group client region - can be defined using specific content properties, and how a group (that is a content element) is referred to within the visual tree.

Expanded Header Content

A group's heading is provided using the NavBarGroup.Header property, which is of type Object, and so can be any type. Typically, group headers display explanatory information about group contents.

Expanded Group Content

The content of a group's client region can be defined by using the NavBarGroup.Items or NavBarGroup.Content property.

  • The NavBarGroup.Items property provides access to the NavBarItemCollection object, and it allows you to create and manipulate a list of items to be displayed within a group.
  • Using the NavBarGroup.Content property, you can provide any custom content for a group. The NavBarGroup.Content property is of type Object, so there are no restrictions on what you can put in group content.

To control how (using which of these properties) group content should be represented, a group provides a specific NavBarGroup.DisplaySource property, which can be set to the DisplaySource.Items or DisplaySource.Content value, respectively.

Note

The NavBarGroup.Items property is, by design, specified as the default property and the content property of a group. This, for example, allows you to declare items in XAML directly after a group declaration, without wrapping them into opening and closing NavBarGroup.Items tags.

The default value of the NavBarGroup.DisplaySource property is DisplaySource.Items, which means that this content type is applied to a group, when the DisplaySource property declaration is omitted within XAML.

The following code demonstrates different methods of group content declaration in XAML.

This code results in the following visual representation:

Expanded Groups in Visual Tree

DXNavBar groups (represented by NavBarGroup instances) are content elements (they derive from System.Windows.ContentElement), and so they are not part of the visual tree; they do not inherit from System.Windows.Media.Visual and do not have a visual representation. In the DXNavBar, the NavBarGroupControl type represents a group in the visual tree and serves as a content host for the group. Since individual groups can be visually represented by different visual elements within the DXNavBar control, a group can be exposed by several NavBarGroupControl objects in the visual tree.

For instance, within the Navigation Pane View, an active group might be referred to by the following visual elements: the expanded group, the corresponding group header or item within the Overflow Panel, or a button within a collapsed Navigation Pane (a click on this button invokes a popup window displaying the active group's contents). These visual elements are represented by individual NavBarGroupControl instances in the visual tree. And, they all refer to a single active group object of the NavBarGroup type.

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