单击删除按钮,如图
删除文件成功,如图
//数据源
private ObservableCollection<CheckRecordModel> checkRecord = new ObservableCollection<CheckRecordModel>();
public ObservableCollection<CheckRecordModel> CheckRecord
{
get { return checkRecord; }
set
{
checkRecord = value;
RaisePropertyChanged(() => CheckRecord);
}
}
//获取到选中行的数据
private void ExecuteDeleteCheckedData(CheckRecordModel checkRecordModelData)
{
if (checkRecordModelData != null)
{
//删除数据
checkRecord.Remove(checkRecordModelData);
}
Messenger.Default.Send("删除数据成功", MessageCenter.MSG_PROMPTMESSAGE);
}