title: PasswordBox and MVVM
body: <p>We have the following scenario:</p>
  
  <ol>
  <li>MVVM userinterface where a user can place his password (actually a <code>PasswordBox</code>)</li>
  <li>Server that shall do some work </li>
  <li>Server connects to some Database that requires authentification</li>
  </ol>
  
  <p>And I already read this <a href="https://stackoverflow.com/questions/1483892/how-to-bind-to-a-passwordbox-in-mvvm">Question on PasswordBox in MVVM</a></p>
  
  <p>But there is no answer on how to do! Just lots over "never ever do that".</p>
  
  <p>What is the correct way of passing a password around?
  How to resolve the security issues?</p>
  
  <p>There is no proper way of <code>Binding</code> to the <code>PasswordBox</code> and
  the Password shall not be stored somewhere, okay.</p>
  
  <p>So, what is the MVVM way of doing such things?</p>
  
  <p>Even if the pattern is broken, is there a good way to achieve such things?</p>
  
  <p>Thought of a <code>Func&lt;string&gt;</code> to retrieve it, but without Binding this
  will get a mess... </p>
  
  <p><strong>Update</strong>
  Same for initialising the PasswordBox from a (hopefully encrypted) password store.
  Isn't that breaking the MVVM pattern? The User does not want to enter the password
  each time he starts the application or wants to work with the database I believe.</p>