前台设置列明了,后台获取不到,也获取不到ContextMenu
<DataGrid.ContextMenu>
<ContextMenu PlacementTarget="{Binding dgv}">
<MenuItem x:Name="menu1" Header="upload" Command="{x:Static local:menu.upload}"
CommandParameter="1"/>
<MenuItem x:Name="menu2" Header="delete" Command="{x:Static local:menu.delete}"/>
</ContextMenu>
</DataGrid.ContextMenu>