We have the following scenario:
PasswordBox
)
IMO the solution proposed by DinoM above is the more elegant solution and much more understandable than the 'Passwordhelper' class utilised in both the links provide by Chandramouleswaran Ravichandra above (But all credit to Samuel Jack for coming up with it in his blog http://blog.functionalfun.net/2008/06/wpf-passwordbox-and-data-binding.html )
To those who couldn't get DinoM's solution to work because of the missing 'UserCredentialsInputControl' type, just change this parameter to typeof(PasswordUserControl) and it will work.
SingletonSean has a video on his Youtube channel entitled;
Binding to a PasswordBox (MVVM) - EASY WPF (.NET CORE) ( https://www.youtube.com/watch?v=G9niOcc5ssw )
This is the best source I have found in terms of being a complete example, except that he uses string instead of SecureString for the base type of the PasswordProperty but that's easily fixable. He also provides a link to the video's source code in his GitHub repo.