I'd like to bind two class properties to a combobox's display. Meaning:
Jack - SupplyChain
Sarah - HR
James - IT
I have the following class:
public class MyUser {
public string Name {get;set;}
public int EmpID {get;set;}
public string Department {get;set;}
}
When I set the combobox to just a single property, DisplayMemberPath="Name", I see the object name instead in the drop down.
I'm not sure how to make it bind to two properties, much less one. Does anyone know how to do that?
I am adding MyClass objects to the combobox:
MyComboBox.Items.Add(classInstance);
since I want to pull out the full class that was selected. This will happen on a button click event.