Reputation: 75
I have struct which includes 2 strings : Name, Uid. I add this struct into listbox and I want that the listbox to show only a Name of struct. How I can do this??
Thanks!
public struct ListItemEl
{
public string Name;
public string Uid;
}
Upvotes: 1
Views: 321
Reputation: 184727
Those need to be public properties if you want DisplayMemberPath
(which should just to be set to Name
) to work.
Upvotes: 2