DashboardLayoutItem.CaptionCustomizationsTemplate Property

Allows you to specify a custom caption template for the DashboardLayoutItem descendants.

Namespace: DevExpress.DashboardWpf

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

Declaration

public DataTemplate CaptionCustomizationsTemplate { get; set; }
Public Property CaptionCustomizationsTemplate As DataTemplate

Property Value

Type Description
DataTemplate

A object that specifies the data template used to render the dashboard item caption.

This property affects all dashboard items except item groups and items whose template is explicitly specified. That is, to override this template and specify a different template for the GridDashboardItem, set the GridItemStyle property to the style whose TargetType="{x:Type dxdash:GridDashboardLayoutItem}". In that style, set the CaptionCustomizationsTemplate property to a data template intended solely for the Grid dashboard items.

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

Note

The complete sample project How to add custom buttons and menu elements to dashboard item captions is available in the DevExpress Examples repository.

<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.DashboardItemStyle>
        <Style TargetType="{x:Type dxdash:DashboardLayoutItem}">
          <Setter Property="CaptionCustomizationsTemplate">
            <Setter.Value>
              <DataTemplate>
                <ItemsControl>
                  <dxb:InsertAction ContainerName="{x:Static dxdasht:DefaultBarItemNames.DashboardItemCaption_Toolbar}">
                    <dxb:InsertAction.Element>
                      <dxb:BarSubItem AllowGlyphTheming="True" Content="My Caption Item">
                        <dxb:BarButtonItem Content="Item1" />
                        <dxb:BarButtonItem Content="Item2" />
                        <dxb:BarButtonItem Content="Item3" />
                      </dxb:BarSubItem>
                    </dxb:InsertAction.Element>
                  </dxb:InsertAction>
                </ItemsControl>
              </DataTemplate>
            </Setter.Value>
          </Setter>
      </dxdash:DashboardControl.DashboardItemStyle>

See Also