Skip to main content
A newer version of this page is available. .
Bar

TemplatedBarManagerController.Template Property

Gets or sets a DataTemplate that defines a BarManagerActionContainer object storing bar customization actions. This is a dependency property.

Namespace: DevExpress.Xpf.Bars

Assembly: DevExpress.Xpf.Core.v18.2.dll

Declaration

public DataTemplate Template { get; set; }

Property Value

Type Description
DataTemplate

A DataTemplate object that defines a BarManagerActionContainer object.

Remarks

The Template property must specify a DataTemplate object that defines a BarManagerActionContainer object. Actions stored in the BarManagerActionContainer will be used to customize the structure of bars of the current BarManager.

Example

This example demonstrates how to modify the current BarManager’s layout in case you do not have direct access to this BarManager. The main idea is to use ControllerBehavior that provides the capability to compose bars or ribbons from templates using built-in Bar Actions.

For versions prior to 15.1:

Use BarManager.Controllers to set a predefined DataTemplate.

The following image shows the result:

E1731

Imports System
Imports System.Collections.Generic
Imports System.Configuration
Imports System.Data
Imports System.Linq
Imports System.Threading.Tasks
Imports System.Windows

Namespace ControllerBehaviorSample
    ''' <summary>
    ''' Interaction logic for App.xaml
    ''' </summary>
    Partial Public Class App
        Inherits Application

    End Class
End Namespace

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Template property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also