How to have a user control as a ListBoxItem
- by Harry
I want to bind a user control (View) to a ListBoxItem. The ListBox is bound to a collection of ViewModels. I have set the ListBox's ItemTemplate as so:
<ListBox.ItemTemplate>
<DataTemplate>
<View:ContactView/>
</DataTemplate>
</ListBox.ItemTemplate>
But all I get are blank ListBoxItems. …