5 writes to SelectedItem
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
261set { ComboBox.SelectedItem = value; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
338_keyComboBox.SelectedItem = KeysConverter.ConvertToString(keyCode);
System.Windows.Forms.Tests (3)
System\Windows\Forms\ComboBoxTests.cs (3)
2265comboBox.SelectedItem = comboBox.Items[selectedIndex]; 2287comboBox.SelectedItem = comboBox.Items[0]; 2307comboBox.SelectedItem = comboBox.Items[0];
20 references to SelectedItem
System.Windows.Forms (9)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildNativeWindow.cs (2)
35object? before = _owner.SelectedItem; 37object? after = _owner.SelectedItem;
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (4)
1082if (SelectedItem is not null && !BindingFieldEmpty) 1087string? candidate = GetItemText(SelectedItem); 1098return FilterItemOnProperty(SelectedItem)!.ToString()!; // heinous. 1112object? selectedItem = SelectedItem;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1453item = EditingComboBox.SelectedItem; 1494item = EditingComboBox.SelectedItem;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
260get { return ComboBox.SelectedItem; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (1)
79ComboBoxItem? comboBoxItem = (ComboBoxItem)_columnTypesCombo.SelectedItem!;
System.Windows.Forms.Tests (9)
System\Windows\Forms\ComboBoxTests.cs (9)
116Assert.Null(control.SelectedItem); 1331Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1337Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1356Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1362Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 2267Assert.Equal(selectedIndex.ToString(), comboBox.SelectedItem); 2272Assert.Null(comboBox.SelectedItem); 2516Assert.True(comboBox.Items[comboBox.SelectedIndex].Equals(comboBox.SelectedItem)); 2536Assert.True(comboBox.Items[comboBox.SelectedIndex].Equals(comboBox.SelectedItem));
TrimTest (1)
Form1.cs (1)
43string text = comboBox1.SelectedItem as string ?? comboBox1.Text ?? string.Empty;