Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 在Datagrid中编辑文本框后按enter键时,应选中复选框_Wpf_Mvvm_Datagrid_Checkbox - Fatal编程技术网

Wpf 在Datagrid中编辑文本框后按enter键时,应选中复选框

Wpf 在Datagrid中编辑文本框后按enter键时,应选中复选框,wpf,mvvm,datagrid,checkbox,Wpf,Mvvm,Datagrid,Checkbox,我有一个带有复选框和一行文本框的datagrid。 当修改并按下“值为”文本框时,应根据是否修改值来选中复选框。 请告诉我怎么做? 我没有代码隐藏文件 <DataGrid...ItemsSource={Binding ViewModel.YourRowItems ...some column <TextBox Text="{Binding SomeText}"... ....some column <CheckBox IsChecked="{Bindin

我有一个带有复选框和一行文本框的datagrid。 当修改并按下“值为”文本框时,应根据是否修改值来选中复选框。 请告诉我怎么做? 我没有代码隐藏文件

   <DataGrid...ItemsSource={Binding ViewModel.YourRowItems
 ...some column
   <TextBox Text="{Binding SomeText}"...

 ....some column
   <CheckBox IsChecked="{Binding IsChecked="{Binding IsSomeProp}"..
…总之,这就是要点

public string SomeText
{
   get {return _someText;}
   set
   {
       if (_someText != value ..
       {
           _someText = value;

           if(value != _originalSomeText)
              IsSomeProp = true;//this of course will raise prop changed for IsSomeProp
           RaisePropertyChanged( ()=> SomeText);
       }
    }