private void cmdAdd_Click(object sender, RoutedEventArgs e) { if (cboName.DataContext.GetType() != typeof(List <string>)) { cboName.DataContext = ArtistServices.GetFullNames(); } if (addPanel.Visibility == Visibility.Collapsed) { addPanel.Visibility = Visibility.Visible; cboName.Text = string.Empty; imgAdd.Source = new BitmapImage(new Uri("pack://application:,,,/myCollections;component/Images/Delete2.png")); } else { addPanel.Visibility = Visibility.Collapsed; imgAdd.Source = new BitmapImage(new Uri("pack://application:,,,/myCollections;component/Images/Add.png")); } }
void _backgroundInfo_DoWork(object sender, DoWorkEventArgs e) { _names = ArtistServices.GetFullNames(); }