Back to Devexpress

DashboardControlBase.TitleCustomizationsTemplate Property

dashboard-devexpress-dot-dashboardwpf-dot-dashboardcontrolbase-3570b30b.md

latest5.1 KB
Original Source

DashboardControlBase.TitleCustomizationsTemplate Property

Allows you to add, remove or modify command buttons and create drop-down menus in the dashboard title.

Namespace : DevExpress.DashboardWpf

Assembly : DevExpress.Xpf.Dashboard.v25.2.dll

NuGet Package : DevExpress.Wpf.Dashboard

Declaration

csharp
public DataTemplate TitleCustomizationsTemplate { get; set; }
vb
Public Property TitleCustomizationsTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that specifies the data template containing bar actions.

|

Remarks

The following XAML snippet adds a drop-down button with three items to the dashboard title.

View Example: How to add custom buttons and menu elements to dashboard item captions

xaml
<Window  
xmlns:dxdash="http://schemas.devexpress.com/winfx/2008/xaml/dashboard"
xmlns:dxdasht="http://schemas.devexpress.com/winfx/2008/xaml/dashboard/themekeys"
xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars">
  <dxdash:DashboardControl>
  <!-- -->
      <dxdash:DashboardControl.TitleCustomizationsTemplate>
        <DataTemplate>
            <ItemsControl>
                <dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardTitle_Toolbar}">
                    <dxb:InsertAction.Element>
                        <dxb:BarSubItem AllowGlyphTheming="True" Content="My Title Item">
                            <dxb:BarButtonItem Content="Item1" />
                            <dxb:BarButtonItem Content="Item2" />
                            <dxb:BarButtonItem Content="Item3" />
                        </dxb:BarSubItem>
                    </dxb:InsertAction.Element>
                </dxb:InsertAction>
            </ItemsControl>
        </DataTemplate>
    </dxdash:DashboardControl.TitleCustomizationsTemplate>
    </dxdash:DashboardControl>

The following code snippets (auto-collected from DevExpress Examples) contain references to the TitleCustomizationsTemplate 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.

wpf-dashboard-how-to-add-custom-caption-menu/CS/WpfDashboardCustomCaptionMenu/MainWindow.xaml#L19

xml
</dxdash:DashboardControl.TitleContentTemplate>
<dxdash:DashboardControl.TitleCustomizationsTemplate>
    <DataTemplate>

wpf-dashboard-custom-properties/CS/Wpf-Dashboard-Custom-Properties/Modules/DashboardDescriptionModule/DashboardDescriptionModule.cs#L16

csharp
ResourceDictionary resources = (ResourceDictionary)Application.LoadComponent(new Uri("/Wpf-Dashboard-Custom-Properties;component/Modules/DashboardDescriptionModule/TitleResources.xaml", UriKind.Relative));
    AssociatedObject.TitleCustomizationsTemplate = resources["titleCustomizationsTemplate"] as DataTemplate;
}

wpf-dashboard-custom-properties/VB/Wpf-Dashboard-Custom-Properties/Modules/DashboardDescriptionModule/DashboardDescriptionModule.vb#L18

vb
Dim resources As ResourceDictionary = CType(Application.LoadComponent(New Uri("/Wpf-Dashboard-Custom-Properties;component/Modules/DashboardDescriptionModule/TitleResources.xaml", UriKind.Relative)), ResourceDictionary)
    AssociatedObject.TitleCustomizationsTemplate = TryCast(resources("titleCustomizationsTemplate"), DataTemplate)
End Sub

See Also

DashboardControlBase Class

DashboardControlBase Members

DevExpress.DashboardWpf Namespace