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.>
You shouldn't insert the combobox items manually. Set them by using ItemsSource.
Basically you should create a list of options (or objects representing options) and set them as ItemsSource
, this way your SelectedItem
will be exactly the option which is selected, not the automatically created wrapping ComboboxItem
.