I want my combobox item names and values to be taken from my List of course I don't want my view model to hold combobox items list.
I got a list a,b,c,d
public List<String> ComboList { get; set; }
...
ComboList = new List<String>();
ComboList.Add("A");
ComboList.Add("B");
ComboList.Add("C");
ComboList.Add("D");
and my ComboBox
<ComboBox Margin="29,40,0,526" Width="212" Height="35" Grid.Row="1" ItemsSource="{Binding Path=ComboList, Mode=OneTime}" SelectedValuePath="Key" DisplayMemberPath="Value"></ComboBox>
but it gives me a empty ComboBox ...

Remove the SelectedValuePath and DisplayMemberPath attributes. They are wrong.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With