how to bind passwordbox in wpf code example
Example: c# wpf passwordbox binding
Sorry, but you're doing it wrong.
People should have the following security guideline tattooed on the inside of their eyelids:
Never keep plain text passwords in memory.