Templating View Elements

  • 3 minutes to read

Using templates provided by the DXNavBar control, you can completely replace the look and feel of view elements, while maintaining their existing behavior. For some view elements (such as group headers, items), templates can be defined at different object levels at the same time (for instance, at the view level and at the group level). In this case, templates created at a lower level in the logical tree take precedence over other templates for the same element (that is, a template defined at the group level has precedence over the same element template created at the view level).

In this topic, common templates (which are available under all views) and templates specific to Navigation Pane Views are listed.

Common Templates

Template properties listed in this section can always be used within the DXNavBar control, regardless of the applied view type.

Group Header Templates

Group Content Template

At the group level, the NavBarGroup.ContentTemplate property can be used to define the appearance of the group content represented by a group's NavBarGroup.Content property if the NavBarGroup.DisplaySource property of the group is set to DisplaySource.Content.

Item Templates

Item Panel Template

Each group arranges its items by stacking them within a specific container panel. At the view level, the NavBarViewBase.ItemsPanelTemplate property can be used to replace the panel type used within groups by default, with the required panel type (which should be a descendant of the Panel type).

 

Below are the listed templates, available only if the Navigation Pane View is applied to the DXNavBar.

Group Button Templates

Collapsed Pane Template

At the view level, use the NavigationPaneView.CollapsedTemplate property to define a template for the pane when it's in the collapsed state.

Expanded Pane Template

At the view level, use the NavigationPaneView.ExpandedTemplate property to define a template for the pane when it's in the expanded state.

Overflow Group Templates

Collapsed Pane Item Templates

At the group level, use the NavBarGroup.CollapsedNavPaneItemsTemplate and NavBarGroup.CollapsedNavPaneItemsTemplateSelector properties.

Peek Form Templates

At the group level, use the NavBarGroup.PeekFormTemplate and NavBarGroup.PeekFormTemplateSelector properties.

Task-Based Help