private void deleteTagBtn_Click(object sender, RoutedEventArgs e) { try { tagsList.RemoveAt(_currentIndex); _currenTag = null; UpdateCurrentTagView(true); } catch (Exception) { Debug.WriteLine("Can not delete!"); } }
private void TagsListView_OnPreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { try { _currentIndex = (sender as ListView).SelectedIndex; _currenTag = tagsList[_currentIndex]; UpdateCurrentTagView(); } catch (Exception) { //MessageBox.Show("Something went wrong :c"); } }