Skip to main content

BaseLayoutItem.ContextMenuCustomizationsTemplate Property

Gets or sets a template used to customize menu items in all affected dock layout items. This is a dependency property.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v23.2.dll

NuGet Package: DevExpress.Wpf.Docking


public DataTemplate ContextMenuCustomizationsTemplate { get; set; }

Property Value

Type Description

A DataTemplate used to customize menu items.


Use the ContextMenuCustomizationsTemplate property to specify a template used to customize the menu items in all the affected layout items.

<Window x:Class="ContextMenuCustomizationTemplate.MainWindow"
            <!-- Specifies common context menu customizations for all affected dock panels -->
            <Style TargetType="dxdo:LayoutPanel">
                <Setter Property="ContextMenuCustomizationsTemplate">
                                <!-- Removes the 'Floating' item -->
                                <dxb:RemoveBarItemAction ItemName="{x:Static  dxdo:DefaultMenuItemNames.Floating}" />
                                <!-- Adds a separator -->
                                <dxb:BarItemSeparator />
                                <!-- Adds a custom bar item -->
                                <dxb:BarButtonItem Content="Test Bar Item" />
                <dxdo:LayoutPanel Caption="Panel1" />
                <dxdo:LayoutPanel Caption="Panel2" />
                <dxdo:LayoutPanel Caption="Panel3" />

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


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