I have a WPF ListBox that I am binding to a collection of Contact objects, similar to
public class Contact
{
int ContactId { get; set; }
int ContactType { get; set; } // 1 = phone number, 2 = email address
string Value { get; set; }
}
My current ListBox binding is
<ListBox Name="ContactsListBox"
ItemsSource="{Binding Contacts, Mode=Oneway}"
SelectedValuePath="ContactId"
DisplayMemberPath="Value"
</ListBox>
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.