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)
{
}

  

 

 

  

posted @ 2022-09-23 09:37  学无止境-dotnet码农  阅读(43)  评论(0编辑  收藏  举报