How to bind a ComboBox to generic dictionary via ObjectDataProvider

前端 未结 3 557
有刺的猬
有刺的猬 2020-12-04 17:35

I want to fill a ComboBox with key/value data in code behind, I have this:

XAML:



        
3条回答
  •  北海茫月
    2020-12-04 18:21

    The way DevExpress 17.1.7 handles this is setting those properties: DisplayMember and ValueMember, in case of a dictionary it would be something like this:

    DisplayMember="Value" 
    ValueMember="Key"
    

提交回复
热议问题