private void combo_SelectionChanged(object sender, SelectionChangedEventArgs e) { ComboValue = (int)combo.Items[combo.SelectedIndex]; p1 = new PictureCollection(ComboValue); listBox1.DataContext = p1.PObjects; listBox1.Visibility = Visibility.Visible; }
private void listBox1_SelectionChanged(object sender, SelectionChangedEventArgs e) { List1Value = listBox1.SelectedIndex; p2 = new PictureCollection(ComboValue, List1Value); listBox2.DataContext = p2.PObjects; listBox2.Visibility = Visibility.Visible; image1.Visibility = Visibility.Visible; image1.Source = new BitmapImage(p1.PObjects[List1Value].CellImage); }