wpf: getting combobox value
- by Martin
I have a WPF ComboBox named cbFileSize. I try to get is selected value like so:
string tmp = cbFileSize.SelectedValue.ToString();
MessageBox.Show(tmp);
But tmp gets set to "System.Windows.Control.ComboBoxItem: 16".
Which function should I use to just get the value "16"?