I have come across the problem of password box binding. My application follows MVVM. When I tried to search google to find out how to solve the issue of password box binding, I found two kinds of solution - 1> Use of attached properties 2> Use of Secure strings (http://www.griffinscs.com/blog/?tag=mvvm). Since the second option seemed to be more secure, I was inclined to choose this option. But latter I found out that I can extract the actual string within the secure string using the following code
IntPtr iPtr = Marshal.SecureStringToBSTR(securePassword);
// securePassword is of SecureString type
string str = Marshal.PtrToStringUni(iPtr);
Now I am little confused. Please help me to understand the folowing issues 1> Is use of Secure string is really better than use of String ? 2> Which one of the above two is the right option when I am following MVVM pattern and at the same time I want password strings to be secure.