In your code, I will assume that you're having a
ComboBox
with a name of
myComboBox. Then the code would be like,
ComboBoxItem selectedItem = (myComboBox.SelectedItem as ComboBoxItem);
This way, once you're done, the variable
selectedItem
will have the value of the ComboBoxItem object that was selected.