title: WPF ListBox binding with conditional display
body: <p>I have a WPF ListBox that I am binding to a collection of Contact objects, similar to </p>
  
  <pre><code>public class Contact
  {
      int ContactId { get; set; }
      int ContactType { get; set; }   // 1 = phone number, 2 = email address
      string Value { get; set; }
  }
  </code></pre>
  
  <p>My current ListBox binding is </p>
  
  <pre><code>&lt;ListBox Name="ContactsListBox"
      ItemsSource="{Binding Contacts, Mode=Oneway}"
      SelectedValuePath="ContactId"
      DisplayMemberPath="Value"
  &lt;/ListBox&gt;
  </code></pre>
  
  <p>I would like to display the phone numbers as text and emails as clickable "mailto:" type hyperlinks, but I'm unclear on how to get the binding to work the way I need.</p>