void IdentifyListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { int index = IdentifyListBox.SelectedIndex; if (index > -1) { IdentifyButton.Content = IdentifyListBox.SelectedItem.ToString(); DataListBox.ItemsSource = _dataItems[index].Data; IdentifyChoicesPage.IsOpen = false; } }