XAML
<ComboBox Height="23.338" x:Name="cboCustom" />
Code which runs when the combobox should be populate
cboCustom.Items.Clear()
For x As Integer = 0 To (_collection.count - 1)
cboCustom.Items.Add(_collection.node(x))
Next
The _collection.node() is class with several properties
And I would like to set the displayMembervalue of the WPF combobo to it’s description property.
I’ve tried
cboCustom.DisplayMemberPath = "myitem.description"
and
cboCustom.DisplayMemberPath = "description"
With no luck.
cboCustom.SeletedItem.description (on select action) does however give me the expected value.
Just use
"Description"on its own (assuming that’s the name of the property you want to display). Also, make sure the casing is correct.