private static string GetSelectedString(ComboBox comboBox) { var s = comboBox.SelectedItem as string; if (s != null && s.EqualsOrdinal(Package.Resources.AutomaticValue)) { s = null; } return s; }