title: How can I bind a C# WPF TextBox to different properties depending on a condition?
body: <p>How can I tell my TextBox to bind to different properties depending on user selection.  My scenario is:  </p>
  
  <p>A customer has these properties: </p>
  
  <ol>
  <li>Mailing Address and </li>
  <li>Shipping Address.  </li>
  </ol>
  
  <p>When editing or creating these, there is a radio button for selecting which address to edit.  So when I click the Mailing Address radio button, I want to bind my TextBox to the property "<code>MailAddress</code>", but when the Shipping Address is clicked, I want to change the binding to the "<code>ShipAddress</code>" property.</p>
  
  <p>I know I can have a property "<code>Address</code>" that gets set when the radio button is clicked, but I want to bind directly to <code>Customer.MailAddress</code> or <code>Customer.ShipAddress</code> for validation purposes (Mail address is required, but ship address is not).</p>