I have a WPF ListBox bound to an ObservableCollection of IProducts. If I specify
DisplayMemberPath="{Binding Path=IProductName}"As part of the ListBox definition in XAML, I get a list of items that looks like this:
System.Data.Entity.DynamicProxies.... System.Data.Entity.DynamicProxies.... System.Data.Entity.DynamicProxies.... System.Data.Entity.DynamicProxies.... System.Data.Entity.DynamicProxies....
But if I specify an item template:
<ListBox.ItemTemplate><DataTemplate><Label Content="{Binding Path=IProductName}" /></DataTemplate></ListBox.ItemTemplate>I get the actual product names...
Specifying the template is not a big deal, but I am curious as to why DisplayMemberPath doesn't work in this scenario.
Thanks.
J
http://digitalcamel.blogspot.com/