Reputation: 663
Just have this quick question. Can I some how make a TextBox to a PasswordBox, or just use "UseSystemPasswordChar".
This is for windows phone.
Now have an icon that I can tap and want to display password and when keyup it hides it again. But since this is for WP it may not bet that easy.
Can't use a PasswordBox beacause that is not allowed on other parts of my application.
UPDATE The textbox I am using looks like this:
<TextBox x:Name="password" BorderBrush="#BF000000" SelectionForeground="White" BorderThickness="2" SelectionBackground="#FF282A6C" Text="{Binding Path=PasswordSetting, Mode=OneWay, Source={StaticResource setting}}" TextChanged="sign_TextChanged_1" Foreground="Black" Background="White"/>
In codebehide if i had a password box i cant have passwordbox.Text.Lenght
UPDATE 2
I solved it, this was a dumb question from the beggning.
Upvotes: 0
Views: 993
Reputation:
You can use the TextBox control by settings its TextMode
attribute to Password
. This should be handled as an ordinary HTML Input that masks for passwords...
<asp:TextBox ID="password" runat="server" TextMode="Password" />
Upvotes: 1