mvvmlight DataGrid Cloms内 Button Command 触发

<Button Content="编辑"  Command="{Binding DataContext.MyCommand, ElementName=MyDataGrid}" CommandParameter="{Binding id}" />
                                  
                       
利用 DataContext 向上查找 Icommand

猜你喜欢

转载自blog.csdn.net/sinat_30224769/article/details/79838540