private void UserKnownAlias_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (UserKnownAlias.SelectedValue != null) { UserListBox.SelectedValue = UserKnownAlias.SelectedValue; UserListBox.ScrollIntoView(UserListBox.SelectedValue); ErrorMessage.Content = ""; } }
private void UserSearchButton_Click(object sender, RoutedEventArgs e) { if (UserSearchBox.Text != null) { try { UserListBox.SelectedValue = UserSearchBox.Text.ToLower(); UserListBox.ScrollIntoView(UserListBox.SelectedValue); ErrorMessage.Content = ""; } catch { ErrorMessage.Content = "User Not Found"; } } }