Skip to main content
Home Forums Silverlight Programming Report a Silverlight Bug Databinding with PasswordBox
9 replies. Latest Post by moriravi on May 5, 2009.
(0)
murtaza....
Participant
1659 points
378 Posts
02-20-2009 5:40 AM |
hello I am Trying to bindthe Password Property of my passwordbox to the Password property of my User object like this
Password
but it is giving some error,
AG_E_RUNTIME_MANAGED_UNKNOWN_ERROR at System.windows.application.loadcomponent(object component,Uri ResourceLocator).
but if i set the Password Property from the code behind it work fine and displays the password chars on the UI.
UserPasswordBox.Password = CurrentUser.Password;
where UserPasswordBox is my PasswordBox Control
ken tucker
All-Star
16324 points
2,493 Posts
02-20-2009 6:58 AM |
You cannot bind to the password field. I personally do not see the need for it. The idea of a password is confirm identy. If the user does not have to enter the password why have one.
02-20-2009 7:06 AM |
I need the password field for user to be able to create an id and also at later stage to Update the Password
Rob Smith
Member
22 points
37 Posts
02-22-2009 12:53 PM |
murtaza, were you able to find a workaround for this issue? Thank for any feedback.
02-22-2009 11:56 PM |
work around is to manually set the field. and take care if it is changed or not
mchlsync
Star
14606 points
2,730 Posts
02-23-2009 12:02 AM |
YOu can use the attached property for that. I will give you the sample on this weekend. If it's urgent, mail me ..
02-24-2009 12:31 AM |
what benifit i will get using the attached property instead of normally setting the Password property from code in code behind
02-24-2009 12:42 AM |
I have sent my file to Rob and he said that it's working for his case. :)
murtaza.dharwala:what benifit i will get using the attached property instead of normally setting the Password property from code in code behind
MComeauS2S
282 points
154 Posts
04-06-2009 3:37 PM |
mchlsync,
Is the recipe to get password binding to work a secret ?
Why didnt you post the solution here ?
I would be interested in hearing how it's done ! Thank you !
moriravi
2 points
1 Posts
05-05-2009 8:39 AM |
Hi...... Checkout on this:
http://www.wpftutorial.net/DataBindPasswordProperty.html