locked
Fill combobox programmatically

    Question

  • Hi, I want to pre-load some data in a combobox using a key/value pair like this:

    Name: xjing

    Value: 0

    I've tried something without success. Can anyone help me?

    I'm using this xaml code:

    <ComboBox x:Name="MyComboBox" SelectedValue="{Binding Path=MyClass.Surname, Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="Name" />

    Saturday, April 27, 2013 3:17 PM

Answers

All replies