WPF DevExpress怎么绑定ViewModel事件
XAML代码
<dxg:GridControl.View>
<dxg:TableView x:Name="ProductGridView" ShowGroupPanel="False" AllowColumnFiltering="False">
<dxmvvm:Interaction.Behaviors>
<dxmvvm:EventToCommand EventName="ValidateCell" Command="{Binding ValidateCell}" PassEventArgsToCommand="True">
</dxmvvm:EventToCommand>
</dxmvvm:Interaction.Behaviors>
</dxg:TableView>
</dxg:GridControl.View>
ViewModel代码
public ICommand<object> ValidateCell { get; private set; } 构造函数() { ValidateCell = new DelegateCommand<object>(Edit); } public void Edit(object arg) { }