I have a combox in my wpf application with three items:
<ComboBoxItem Tag="some value">Text</ComboBoxItem>
<ComboBoxItem Tag="some value2">Text2</ComboBoxItem>
<ComboBoxItem Tag="some value3">Text3</ComboBoxItem>
I want to get a selected text or value at runtime. When I do this:
myComboBox.SelectedValue.ToString()
it returns this:
System.Windows.Controls.ComboBoxItem: Text2
How can I get a selected text or value?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…