private void AddAuthor(object sender, RoutedEventArgs e)
 {
     if (!string.IsNullOrEmpty(NewAuthorTextBox.Text) && !string.Equals(NewAuthorTextBox.Text, "New author..."))
     {
         _dc.Authors.Add(NewAuthorTextBox.Text);
         _dc.ApplyFilter();
     }
 }
示例#2
0
        private void RemoveAuthor(object sender, RoutedEventArgs e)
        {
            var author = (string)((FrameworkElement)sender).DataContext;

            _dc?.TabInfoVM.Authors.Remove(author);
            _dc?.ApplyFilter();
        }
 private void RemoveAuthor(object sender, RoutedEventArgs e)
 {
     _dc.Authors.Remove(((FrameworkElement)sender).DataContext as string);
     _dc.ApplyFilter();
 }