private void SelectionChanged(object sender, SelectionChangedEventArgs e) { selectedUser = (User)userListBox.SelectedItem; PasswordTextBox.Text = selectedUser.GetPassword; userTypeLabel.Content = selectedUser.GetUserType(); }