Get wpf combobox selected value

后端 未结 5 1134
无人及你
无人及你 2021-02-13 17:53

How do I get the selected value (eg Option1) as a string from my example below. I\'ve tried loads of suggestions on Google but can\'t get the string.

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-13 18:36

    You should set SelectedValuePath="Content".

    
        Option1
        Option2
        Option3
    
    

提交回复
热议问题