Skip to main content
All docs
V21.2
  • GridContextMenuInfoBase.Commands Property

    Provides access to GridControl commands.

    Namespace: DevExpress.UI.Xaml.Grid

    Assembly: DevExpress.UI.Xaml.Grid.v21.2.dll

    NuGet Package: DevExpress.Uwp.Controls

    Declaration

    public GridControlCommands Commands { get; }

    Property Value

    Type
    GridControlCommands

    Remarks

    Use this property to bind the Command property in your menu items to GridControl’s commands:

    xmlns:dxg="using:DevExpress.UI.Xaml.Grid"
    xmlns:dxr="using:DevExpress.UI.Xaml.Ribbon"
    
    <dxg:GridControl    AllowGrouping="True"
                        ShowGroupPanel="True">
        <dxg:GridControl.GroupPanelMenu>
            <dxr:ContextToolbarControl Orientation="Vertical">
                <dxr:ContextToolbarGroup>
                    <dxr:ContextToolbarButton   Content="Expand All Groups"
                                                Command="{Binding Commands.ExpandAllGroups}"/>
                    <dxr:ContextToolbarButton   Content="Collapse All Groups"
                                                Command="{Binding Commands.CollapseAllGroups}"/>
                </dxr:ContextToolbarGroup>
            </dxr:ContextToolbarControl>
        </dxg:GridControl.GroupPanelMenu>
    </dxg:GridControl>
    
    See Also