When I attempt to bind to the Password property of the PasswordBox (binded to a property on an object that returns a string), I get the following error:
Object of type 'System.Windows.Data.Binding' cannot be converted to type 'System.String'.
Is string the wrong type....I tried char[] with the same result.

Unable to data-bind to a PasswordBox
sandyk
PasswordBox.Password doesn't have a corresponding DependencyProperty, so you can't data-bind to it.
Exposing a DependencyProperty would require us to store the PasswordBox content plain text in memory in the property system -- which is a security concern. The PasswordBox encrypts its content and only generates plain text on demand when a caller references the Password CLR property.
dpechter
Georges Vidal
HTH,
Drew
Annie C D B
Hi,
I want to use the Password of a PasswordBox as CommandParameter of a Button.
Since the Password can't be dinding, how to do so