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