WPF MVVM ComboBox SelectedItem or SelectedValue not working

前端 未结 18 2375
一生所求
一生所求 2020-12-05 06:22

Update

After a bit of investigating. What seems to be the issue is that the SelectedValue/SelectedItem is occurring before the Item source is finis

18条回答
  •  温柔的废话
    2020-12-05 06:57

    The type of the SelectedValuePath and the SelectedValue must be EXACTLY the same.

    If for example the type of SelectedValuePath is Int16 and the type of the property that binds to SelectedValue is int it will not work.

    I spend hours to find that, and that's why I am answering here after so much time the question was asked. Maybe another poor guy like me with the same problem can see it.

提交回复
热议问题