arâmetro de comando @Pass do xaml
Tento fazer algo assim:
<DataGrid Name="myGrid" ItemSource="{Binding Path=MyCollection}">
<DataGrid.ContextMenu>
<ContextMenu>
<MenuItem
Command="{Binding RemoveRow}"
CommandParameter="{Binding ElementName=myGrid, Path=SelectedItem}">
</ContextMenu>
</DataGridContextMenu>
</DataGrid>
mas sempre tenho nulo (tentei também SelectedIndex e SelectedValue)
se eu passar o seguinte parâmetro para o código de execução, ele funcionará:
<MenuItem Command="{Binding RemoveRow}" CommandParameter="1">