I have a Silverlight app that requires the user to log into the system, therefore I have a TextBox for the username, a PasswordBox for the password (what else ;-)) and a Button to log in.
When the user clicks on the Button I set the TextBox's + PasswordBox's IsEnabled property to false and when the login process is done I reset this property to true again.
The problem is that when the login doesn't succeed the user would have to reenter his credentials but that's not possible anymore - the cursor blinks inside the PasswordBox but you can't enter any text into it or anything else. It just seems like this control
is somewhere overlayed by another control which isn't the case here as it is hosted inside a StackPanel.
Any ideas what could be going on here and how to fix it?
The click on 'btnLogon' calls the method below with a parameter value of 'false' to disable the controls and also calls the async WCF service that verifies the given credentials.
In the 'Completed' part of the async WCF service the method below is called again with a parameter value of 'true'.
robert.oh.
0 Points
3 Posts
PasswordBox and text input problems
Dec 11, 2008 01:56 PM | LINK
Hi,
I have a Silverlight app that requires the user to log into the system, therefore I have a TextBox for the username, a PasswordBox for the password (what else ;-)) and a Button to log in.
When the user clicks on the Button I set the TextBox's + PasswordBox's IsEnabled property to false and when the login process is done I reset this property to true again.
The problem is that when the login doesn't succeed the user would have to reenter his credentials but that's not possible anymore - the cursor blinks inside the PasswordBox but you can't enter any text into it or anything else. It just seems like this control is somewhere overlayed by another control which isn't the case here as it is hosted inside a StackPanel.
Any ideas what could be going on here and how to fix it?
Thanks,
robert.oh.
hmaprk
Member
175 Points
77 Posts
Re: PasswordBox and text input problems
Dec 15, 2008 09:19 PM | LINK
Could you post some of your xaml and code behind? That would help.
http://dotnetgui.blogspot.com/
-Please mark As Answer if this answers your question. Thanks
robert.oh.
0 Points
3 Posts
Re: PasswordBox and text input problems
Dec 15, 2008 09:40 PM | LINK
Good evening,
here's the code:
The click on 'btnLogon' calls the method below with a parameter value of 'false' to disable the controls and also calls the async WCF service that verifies the given credentials.
In the 'Completed' part of the async WCF service the method below is called again with a parameter value of 'true'.
Hope this helps.
Thanks for advice!
FuryDiamond
All-Star
23879 Points
4072 Posts
Re: Re: PasswordBox and text input problems
Dec 15, 2008 10:19 PM | LINK
Some of the XAML code is cut off. When the WCF fails, do you have it calling the SetLogOn function?
Silverlight 5 3D Tutorials: http://silverlight.bayprince.com
Blog: http://blog.bayprince.com
Twitter: http://twitter.com/bayprince
robert.oh.
0 Points
3 Posts
Re: Re: PasswordBox and text input problems
Dec 16, 2008 06:57 AM | LINK
Good morning,
I can't see cut off XAML code.
But yes, if the service fails I'm also calling the method that enables the controls again.
Thanks,
robert.oh.
Ozanges
Member
29 Points
26 Posts
Re: Re: PasswordBox and text input problems
Mar 03, 2009 01:26 PM | LINK
Is there anybody who's found a workaround ? I have the same problem, and i have not finded a better practice than add a panel over textbox.