Varo 28 Posted September 16, 2018 Report Share Posted September 16, 2018 Hi, How do we get password value from passwordBox in XAML UI plugin ? TextBox are working fine, but passwordBox not work. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted September 16, 2018 Report Share Posted September 16, 2018 Normally to get the value of a control you wouldn't otherwise be able to - I would bind the value to an invisible textbox and read it from there. But the passwordbox is kind of a special exception because you can't do that. I think in this case it would need to be added to the plugin. You might be able to make a control which displays the * character but I have a feeling this wouldn't work either and you would just end up with a bunch of stars as the value instead of the password because it would be reading the text property. Or maybe you can hide a password box and have the user input into a textbox then bind the text to the password box and then hide the textbox and show the password box. It's not ideal but maybe it could work. Here's a brief example how to bind it: <StackPanel> <TextBox x:Name="tb1" Text="{Binding ElementName=pb1, Path=Password, UpdateSourceTrigger=PropertyChanged}"/> <PasswordBox x:Name="pb1"/> </StackPanel> 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.