In .NET Framework 3.0 (WPF) Microsoft have removed the property of a TextBox, which specifies whether the textbox is Password or Normal type. But in replacement they’ve introduced a new control named PasswordBox which is very simple and intuitive to use. Here is a simple example:
By default the PasswordChar is set to the big black dot from Windows XP style logon and.
In order to detect changes in the password you must handle the PasswordChanged event:
Private Sub txtPassword_PasswordChanged(ByVal sender As System.Object _
, ByVal e As System.Windows.RoutedEventArgs _
) Handles txtPassword.PasswordChanged
An in order to retrieve the typed password you just use the Password property of the PasswordBox control:
Public Function IsAuthenticated() as Boolean
Return txtPassword.Password <> ""