WPF MVVM DataGrid Button Command绑定

时间:2016-02-02 16:40:25   收藏:0   阅读:629

WPF MVVM DataGrid Button Command绑定

<Button  Content="删除"
                                     Background="{StaticResource mainColor}"
                                     Width="90"
                                     Height="35"
                                     Style="{StaticResource BtnStyle}"
                                     Command="{Binding Path=DataContext.ExecuteDelDrugCommand,       
 RelativeSource= {RelativeSource FindAncestor,
  AncestorType={x:Type DataGrid}}}" />

 

原文:http://www.cnblogs.com/zhaohaoran/p/5177576.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!