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