Base:
property
SelectedIndex
System.Windows.Forms.ListControl.SelectedIndex
62 writes to SelectedIndex
DesignSurface (1)
MainForm.cs (1)
202cb1.SelectedIndex = 1;
System.Windows.Forms (17)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (1)
202_owningComboBox.SelectedIndex = GetCurrentIndex();
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (13)
926SelectedIndex = -1; 932SelectedIndex = x; 1029SelectedIndex = -1; 1121SelectedIndex = -1; 1132SelectedIndex = index; 1178SelectedIndex = index; 2030SelectedIndex = 0; 2049SelectedIndex = 0; 2056SelectedIndex = FindString(MatchingText); 2095SelectedIndex = itemFound; 2846SelectedIndex = -1; 3018SelectedIndex = DataManager.Position; 3022SelectedIndex = selectedIndex;
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
427_owner.SelectedIndex = index;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
49SelectedIndex = -1;
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
243set { ComboBox.SelectedIndex = value; }
System.Windows.Forms.Design (8)
System\Windows\Forms\Design\DataGridViewAddColumnDialog.cs (4)
700_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewTextBoxColumn)); 821_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewCheckBoxColumn)); 826_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewImageColumn)); 831_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewTextBoxColumn));
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (3)
88_keyComboBox.SelectedIndex = -1; 334_keyComboBox.SelectedIndex = -1; 343_keyComboBox.SelectedIndex = 0;
System\Windows\Forms\Design\StyleEditorForm.cs (1)
549_columnsOrRowsComboBox.SelectedIndex = _isRowCollection ? 1 : 0;
System.Windows.Forms.Tests (34)
System\Windows\Forms\AccessibleObjects\ComboBox.ComboBoxItemAccessibleObjectTests.cs (3)
670comboBox.SelectedIndex = 1; 679comboBox.SelectedIndex = 1; 688comboBox.SelectedIndex = 1;
System\Windows\Forms\ComboBox.ComboBoxUiaTextProviderTests.cs (23)
286comboBox.SelectedIndex = 0; 309comboBox.SelectedIndex = 0; 348comboBox.SelectedIndex = 0; 370comboBox.SelectedIndex = 0; 437comboBox.SelectedIndex = 0; 465comboBox.SelectedIndex = 0; 503comboBox.SelectedIndex = 0; 542comboBox.SelectedIndex = 0; 626comboBox.SelectedIndex = 0; 645comboBox.SelectedIndex = 0; 663comboBox.SelectedIndex = 0; 679comboBox.SelectedIndex = 0; 782comboBox.SelectedIndex = 0; 823comboBox.SelectedIndex = 0; 850comboBox.SelectedIndex = 0; 869comboBox.SelectedIndex = 0; 952comboBox.SelectedIndex = 0; 982comboBox.SelectedIndex = 0; 1013comboBox.SelectedIndex = 0; 1044comboBox.SelectedIndex = 0; 1064comboBox.SelectedIndex = 0; 1152comboBox.SelectedIndex = 0; 1173comboBox.SelectedIndex = 0;
System\Windows\Forms\ComboBoxTests.cs (8)
1329control.SelectedIndex = value; 1335control.SelectedIndex = value; 1354control.SelectedIndex = value; 1360control.SelectedIndex = value; 2510comboBox.SelectedIndex = index; 2513comboBox.SelectedIndex = index; 2532comboBox.SelectedIndex = index; 2603comboBox.SelectedIndex = selectedIndex;
WinFormsControlsTest (2)
Calendar.cs (1)
14daysOfWeekComboBox.SelectedIndex = (int)monthCalendar1.FirstDayOfWeek;
ComboBoxes.cs (1)
15comboBox1.SelectedIndex = 0;
43 references to SelectedIndex
PresentationUI (4)
MS\Internal\Documents\RMPublishingDialog.cs (4)
215if (radioButtonTemplate.Checked && (comboBoxTemplates.SelectedIndex < _templates.Count)) 217return _templates[comboBoxTemplates.SelectedIndex].Template; 616ToggleSave(comboBoxTemplates.SelectedIndex > 0); 792ToggleSave(comboBoxTemplates.SelectedIndex > 0);
System.Windows.Forms (20)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (1)
207int selectedIndex = owner.SelectedIndex;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxChildListUiaProvider.cs (2)
147int selectedIndex = _owningComboBox.SelectedIndex; 160int selectedIndex = _owningComboBox.SelectedIndex;
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (1)
115UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(_owningComboBox.Focused && _owningComboBox.SelectedIndex == GetCurrentIndex()),
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (13)
870if (SelectedIndex == value) 911int index = SelectedIndex; 1175if ((index != -1) && (index != SelectedIndex)) 2093if (itemFound != SelectedIndex) 2233if (DropDownStyle == ComboBoxStyle.DropDownList && SelectedIndex == index) 2384_selectedIndex = SelectedIndex; 2622if (DataManager is not null && DataManager.Position != SelectedIndex) 2625if (!FormattingEnabled || SelectedIndex != -1) 2627DataManager.Position = SelectedIndex; 2977int selectedIndex = SelectedIndex; 3332return SelectedIndex == -1 && base.ShouldSerializeText(); 3429if (SelectedIndex != -1) 3431object? item = Items[SelectedIndex];
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
419bool selected = (index == _owner.SelectedIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
122if (SelectedIndex != -1)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (1)
242get { return ComboBox.SelectedIndex; }
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ShortcutKeysEditor.ShortcutKeysUI.cs (1)
360int cmbKeySelectedIndex = _keyComboBox.SelectedIndex;
System.Windows.Forms.Tests (17)
System\Windows\Forms\ComboBoxTests.cs (17)
115Assert.Equal(-1, control.SelectedIndex); 1330Assert.Equal(value, control.SelectedIndex); 1331Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1336Assert.Equal(value, control.SelectedIndex); 1337Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1355Assert.Equal(value, control.SelectedIndex); 1356Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 1361Assert.Equal(value, control.SelectedIndex); 1362Assert.Equal(value == -1 ? null : control.Items[control.SelectedIndex], control.SelectedItem); 2266Assert.Equal(selectedIndex, comboBox.SelectedIndex); 2271Assert.Equal(-1, comboBox.SelectedIndex); 2512int selectedIndex = comboBox.SelectedIndex; 2515Assert.Equal(index, comboBox.SelectedIndex); 2516Assert.True(comboBox.Items[comboBox.SelectedIndex].Equals(comboBox.SelectedItem)); 2531int selectedIndex = comboBox.SelectedIndex; 2535Assert.Equal(index, comboBox.SelectedIndex); 2536Assert.True(comboBox.Items[comboBox.SelectedIndex].Equals(comboBox.SelectedItem));
WinFormsControlsTest (1)
Calendar.cs (1)
58monthCalendar1.FirstDayOfWeek = (Day)daysOfWeekComboBox.SelectedIndex;