tags:

views:

62

answers:

1

I've seen how to bind a ComboBox to a list that has columns like this:

ItemsSource="{Binding Path=Entries}"
DisplayMemberPath="Name"
SelectedValuePath="Name"
SelectedValue="{Binding Path=Entry}"

but If I got a plain list with lets say countries in an 'ObservableCollection'

How do I bind to this?

I can't use 'DisplayMemberPath' since I have no ColumnNames and the same with 'SelectedValuePath'.

Once I just created a class with columnnames and added rows into that and later binded to it, but that just seems so nuts :P The problem i got is to get the selected value out with binding. Filling the list seems to work with just using 'ItemsSource'

The answer should be done in XAML only, if possible.

:P:P:P My bad :P I just use the 'SelectedValue' and that has the value :D

+1  A: 

My bad :P I just use the 'SelectedValue' and that has the value :D

MemoryToLow