wpf: getting combobox value
Posted
by Martin
on Stack Overflow
See other posts from Stack Overflow
or by Martin
Published on 2010-04-06T17:43:03Z
Indexed on
2010/04/06
18:03 UTC
Read the original article
Hit count: 528
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"?
© Stack Overflow or respective owner