I have a WPf Toolkit-datagrid..in my application which开发者_运维知识库 follows MVVM pattern. How I can call a function in view-model if user selects a particular row in datagrid ?
in view
  <DataGrid ItemSource="{Binding MyItems}"
            SelectedItem = "{Binding MyCurrentItem}"
             >
in vm
private Myobject myCurrentItem;
public Myobject MyCurrentItem
                   {
                      get{ return myCurrentItem; }
                      set{
                            if (myCurrentItem!=value)
                            {
                               myCurrentItem=value;
                               DoMyStuff();
                            }                              
                         }
                    }
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论