private void NotesList_OnItemTapped(object sender, ItemTappedEventArgs e) { switch (_previouslySelectedItem.Equals(e.Item)) { case true: _previouslySelectedItem = (NoteModel)NotesList.SelectedItem; NotesList.SelectedItem = null; UpdateButton.IsEnabled = DeleteButton.IsEnabled = false; OnAppearing(); break; case false: _previouslySelectedItem = (NoteModel)NotesList.SelectedItem; UpdateButton.IsEnabled = DeleteButton.IsEnabled = true; break; } }