Как я могу сделать TextBox «полем пароля» и отображать звездочки при использовании MVVM?C#

Место общения программистов C#
Anonymous
Как я могу сделать TextBox «полем пароля» и отображать звездочки при использовании MVVM?

Сообщение Anonymous »


How can I do this in XAML:

PSEUDO-CODE:

so that the user sees stars or dots when he is typing in the password.

I've tried various examples which suggest PasswordChar and PasswordBox but can't get these to work.

e.g. I can do this as shown here:

but I of course want to bind the Text property to my ViewModel so I can send the value the bound TextBox when the button is clicked (not working with code behind), I want to do this:

But PasswordBox doesn't have a Text property.


Источник: https://stackoverflow.com/questions/111 ... using-mvvm

Вернуться в «C#»