How do I set CommandParameter in XAML?
问题 I have the following XAML: <dxg:GridControl Name="theGrid" DataSource="{Binding Path=Groupings}"> <dxg:GridControl.ContextMenu> <ContextMenu> <MenuItem x:Name="gridprint" Command="{Binding Path=GridPrintCommand}"/> </ContextMenu> </dxg:GridControl.ContextMenu> </dxg:GridControl> When GridPrintCommand executes, its parameter to the GridPrintCommand.Execute(param) method is null. I want to set the parameter to the grid control. I can do that in the code-behind like this: gridprint