I trying to create a basic user log-in and so far, if they are a first time user, can create a Username and Password, the info of which goes into a List<> called 'userlist' which stores there given Password and Username.
Now I would ideally like to use a masked textbox for the password field.....which in WPF turns out to be called a 'Password' box.
The problem is I can't figure out how to connect the password box 'password' (content) to the password given in the userlist.
It seems to me you can only have 1 PWbox with a pre-difined password....or am I just missing a trick here?
my current code is
private void btnLogin_Click(object sender, RoutedEventArgs e)
foreach (User u in userlist)
if ( u.userName != tbUserbox.Text)
if ( tbPasswordbox.Equals(u.passWord))
tabPW.Visibility = Visibility.Visible;
tabCnpw.Visibility = Visibility.Visible;
tabUS.Visibility = Visibility.Visible;
tabLogin.Visibility = Visibility.Collapsed;
Many Thanks for the help.