Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TemplatedBarManagerController Class

Represents a controller that loads bar customization actions from a DataTemplate object, and executes those applying to a BarManager.

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public class TemplatedBarManagerController :
    BarManagerController

#Remarks

Bar customization actions are objects that are capable of creating the structure of bars or modifying the existing structure of bars. Actions are typically added to a BarManagerActionContainer object, which is storage for actions. When actions are executed, they are executed in the order in which they have been added to the BarManagerActionContainer.

The TemplatedBarManagerController allows you to load and apply bar customization actions that are defined by a BarManagerActionContainer within a DataTemplate object. A DataTemplate object can be defined in resources. This allows the actions to be shared among different windows of a single application or among multiple applications (if the actions are defined in resources of a DLL library).

See Bar Actions to learn more.

#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 v15.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

#Implements

See Also