WPF---对于没有Command属性的添加以下代码可以达到有Command效果

<sumer:EventToCommandBehavior.EventBindings>  

            // Command 对应Viewmodel      CommandParameter传递参数     Binding 属性, ElementName=绑定的控件名称  EventName事件名称  
                                <sumer:EventBinding Command="{Binding OnGridViewChange}" CommandParameter="{Binding SelectedItem, ElementName=ManifestLoadGridView}" EventName="CellEditEnded"/>
                            </sumer:EventToCommandBehavior.EventBindings>

posted @ 2015-06-01 11:29  weiwenjie  阅读(655)  评论(0编辑  收藏  举报