private void RestoreNote(Guid noteId) { NoteViewModel viewModel = RecycledNotes.Find(item => noteId == item.Id); if (viewModel != null) { Modified = true; viewModel.InRecyclingBin = false; RecycledNotes.Remove(viewModel); } OnPropertyChanged("Notes"); }
private void RestoreNote(object value) { Guid noteId = (value is Guid) ? (Guid)value : new Guid(value.ToString()); NoteViewModel viewModel = RecycledNotes.Find(item => noteId == item.Id); if (viewModel != null) { Modified = true; viewModel.InRecyclingBin = false; RecycledNotes.Remove(viewModel); } OnPropertyChanged("Notes"); }