Questions tagged [passwordbox]

A built-in control in .NET framework class library (FCL) for taking password input. Please consider using this tag if you've a question about passwordbox control while developing thick client .NET applications. Not to be confused with text box control which also has the password masking capability to hide any character being typed in it.

PasswordBox control are currently available at two places in .NET:

  1. PasswordBox for WPF present in System.Windows.Controls namespace
  2. PasswordBox for Universal Windows Platform (UWP) apps present in Windows.UI.Xaml.Controls namespace

PasswordBox control looks like a traditional plain text box control but in place of the text being typed, it shows some mask character configured by the programmer e.g. asterisk (*), dots (.) or filled circle. Masking the typed characters is default property of PasswordBox control. So in that sense, it is different from plain text box control which can optionally show masked characters if configured that way.

138 questions
65
votes
6 answers

C# how to get text value from PasswordBox?

I have a PasswordBox. how can I get the input value from the PasswordBox after the input has been finished?
5YrsLaterDBA
  • 33,370
  • 43
  • 136
  • 210
56
votes
14 answers

SKPaymentQueue addTransactionObserver asking for App Store password on startup after in-app purchase

My app is using in-app purchases, and most of my users can purchase just fine without any problems. For these folks, my app downloads the content after the purchase succeeds and they are happy. However, for a growing number of my users, once they…
montuno
  • 867
  • 1
  • 7
  • 15
41
votes
5 answers

C# - compare two SecureStrings for equality

I have a WPF application with two PasswordBoxes, one for the password and another for the password to be entered a second time for confirmation purposes. I was wanting to use PasswordBox.SecurePassword to get the SecureString of the password, but I…
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
30
votes
3 answers

Caliburn.Micro support for PasswordBox?

The Caliburn.Micro home page at http://caliburnmicro.com makes the below claim but I am unable to make CM work with a PasswordBox control using any variation I can think of from that example. Don't see how this would work anyway since the names are…
Dave
  • 1,822
  • 2
  • 27
  • 36
27
votes
6 answers

Textbox using textmode password not showing text asp.net c#

I have a few buttons on a web form, and when the user clicks them they will update the the textbox. This worked till I added the textmode = password. Now the textbox doesn't show the text anymore. I debugged the app, and the text property is getting…
nate
  • 1,418
  • 5
  • 34
  • 73
22
votes
3 answers

What's the Best Way to Catch the Return Key in a PasswordBox? (WPF/XAML)

What's the best way to catch the return key in a PasswordBox? (WPF/XAML) I have a TextBox field and a PasswordBox field on my login form (for username and password entry). I also have a login button which invokes the method that performs the login…
Giffyguy
  • 20,378
  • 34
  • 97
  • 168
21
votes
5 answers

PasswordBox and MVVM

We have the following scenario: MVVM userinterface where a user can place his password (actually a PasswordBox) Server that shall do some work Server connects to some Database that requires authentification And I already read this Question on…
Mare Infinitus
  • 8,024
  • 8
  • 64
  • 113
20
votes
5 answers

PasswordBox with MVVM

Hi people stackoverflow. I'm working with MVVM, I have ViewModel call UserViewModel with a Property Password. In the View have a control PasswordBox. But this xaml don't work. How…
Rangel
  • 2,673
  • 4
  • 18
  • 11
14
votes
3 answers

How to show characters for a few seconds in a WPF password box?

If the user enters 1985 in the password box, four bullets (●●●●) will be shown. How can I show each letter or number entered for a few seconds and after that change it to a bullet? I suppose that this can't be done in the password box, but is there…
Simce
  • 141
  • 1
  • 1
  • 3
12
votes
2 answers

PasswordBox Binding

I'm just getting started with M-V-VM and WPF and having issues understanding some binding issues. I have a login page that has a ComboBox and a PasswordBox. The ComboBox looks like this:
djschwartz
  • 1,236
  • 3
  • 14
  • 23
10
votes
3 answers

PasswordBox does not apply style

I have the following style definitions: