passwordbox

Caliburn.Micro support for PasswordBox?

陌路散爱 提交于 2019-12-18 11:53:21
问题 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 not the same case. Does anyone have a CM example that does allow me to get the value of the PasswordBox? Is there a particular version of CM required? I'm running version 1.5.2 of CM. Ideally w/o using Attached Properties but if can work with CM

PasswordBox with MVVM

北战南征 提交于 2019-12-18 03:56:59
问题 Hi people stackoverflow. I'm working with MVVM, I have ViewModel call UserViewModel with a Property Password. In the View have a control PasswordBox. <PasswordBox x:Name="txtPassword" Password="{Binding Password}" /> But this xaml don't work. How do you do the binding?? Help please!! 回答1: For security reasons the Password property is not a dependency property and therefore you can't bind to it. Unfortunately you'll need to perform the binding in the code behind the old fashioned way (register

WPF textbox with image

删除回忆录丶 提交于 2019-12-18 02:58:08
问题 I'm doing a WPF login interface. In my login panel, I have one login TextBox and a PasswordBox . As what shown in the first image below, there is a little human logo in the login textbox and a lock in the password box. I set the image into the textbox background, and then when i try to insert some word into the login box, the words will overide the human logo(image B). Any advice to make it right? My XAML: <TextBox Width="380" Height="25" HorizontalAlignment="Center" Foreground="WhiteSmoke"

cannot centre align password in passwordbox in WP7

扶醉桌前 提交于 2019-12-11 15:25:24
问题 Im not able to centre align password in a PasswordBox in Windows Phone. The centre align is disabled. Is there any method by which we can align the text to the centre? I tried setting of the verticalcontentalignment and the horizontalcontentalignment to center but it does not have any effect. Or is it possible to give a spacing between the border of the password box and the password. Alfah 回答1: You can edit the control template to achieve that effect: <phone:PhoneApplicationPage x:Class=

Check PasswordBox if user type anything in WPF

为君一笑 提交于 2019-12-11 11:07:27
问题 I am using PasswordBox and I want to detect whenever the user typed there anything, if yes I need to change Button status to enabled. How can I check if user types anything in the PasswordBox ? It behaves differently from TextBox since you can't bind it to text and when user types anything raises some event. Any idea? I have tried with the code below, but I get errors: <PasswordBox> <i:Interaction.Triggers> <EventTrigger EventName="KeyDown"> <si:InvokeDataCommand Command="{Binding MyCommand}"

Bind a WPF passwordbox

柔情痞子 提交于 2019-12-11 06:37:19
问题 I want to bind a Passwordbox in the XAML code. Now I found out that it isn´t possible to bind it because you haven´t any dependency property. For my case I don´t need any security in my Application. I just don´t want to display clear text to the user. Is there any other option to realize a kind of passwordbox with a textbox or so on? 回答1: The Password property is not a dependency property -- for security reasons. You can easily get the plain-text password, though. XAML: <PasswordBox x:Name=

How do I change the on-screen keyboard for a PasswordBox

三世轮回 提交于 2019-12-07 13:00:45
问题 I have a box that I want to take a password of only numbers (like an ATM-card PIN), how is the best way to do that? Requirements: Password (with the hidden numbers) Typing digits as the default (only?) keyboard What I've tried: I thought that InputScopes would be the way to go, but I can't set the input scope on a password box. I even tried putting the password InputScope on a normal TextBox, but that didn't mask the appearance of the characters in the text box. Suggestions? 回答1: Short

How do I change the on-screen keyboard for a PasswordBox

天大地大妈咪最大 提交于 2019-12-05 21:02:39
I have a box that I want to take a password of only numbers (like an ATM-card PIN), how is the best way to do that? Requirements: Password (with the hidden numbers) Typing digits as the default (only?) keyboard What I've tried: I thought that InputScopes would be the way to go, but I can't set the input scope on a password box. I even tried putting the password InputScope on a normal TextBox, but that didn't mask the appearance of the characters in the text box. Suggestions? Short version - you don't out-of-the-box as far as I know. You're absolutely right that PasswordBox don't support

WPF PasswordBox Caret

让人想犯罪 __ 提交于 2019-12-05 16:52:16
Is there a way to hide or move the PasswordBox's caret? In .NET 3.5 SP1 or previous, there is no clean way to specify the color of a WPF TextBox/PasswordBox caret. However, there is a way to specify (or in this case remove) that caret from view (via a hack). The caret color is the inverse color of the TextBox/PasswordBox's background color. THus, you can make the background color "transparent black", which will fool the system into using a white caret (which is not visible). The code is (simply) as follows: <PasswordBox Background="#00000000" /> For further information on this issue, please

A good way to show password in PasswordBox

故事扮演 提交于 2019-12-03 18:10:45
问题 I wonder i some one have any good idea how to show the password in the PasswordBox. Have read that you can bind a textbox to a passwordbox but isnt it another way to do it. 回答1: If you want your password to be visible you should use a textbox. The only function of a password box is to mask input. It doesn't provide extra functionality. Its also possible to switch your textbox and password box at runtime 回答2: There are no any inbuilt properties to show password character in PasswordBox control