I know there is a few topics on this problem but haven't find any solutions to this problem I have..
I have a ViewModel with an observable collection and I want to bind this collection to a combo box. However, there is no selected item, no index, just the collection itself.
in the XAML I have
ComboBox ItemsSource="{Binding OSCollection}" DisplayMemberPath="OSCollection.Name"
I believe the trouble lies with the bold above, I want to get a property from the collection called name, but like I say - no item will be selected before the bind.
I could use a foreach or something to extract the properties from the collection but I don't think this is the MVVM and WPF way.
Any help would be grateful.
Thanks