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)
925SelectedIndex = -1; 931SelectedIndex = x; 1028SelectedIndex = -1; 1120SelectedIndex = -1; 1131SelectedIndex = index; 1177SelectedIndex = index; 2029SelectedIndex = 0; 2048SelectedIndex = 0; 2055SelectedIndex = FindString(MatchingText); 2094SelectedIndex = itemFound; 2845SelectedIndex = -1; 3017SelectedIndex = DataManager.Position; 3021SelectedIndex = selectedIndex;
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (1)
427_owner.SelectedIndex = index;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
50SelectedIndex = -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)
701_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewTextBoxColumn)); 828_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewCheckBoxColumn)); 833_columnTypesCombo.SelectedIndex = TypeToSelectedIndex(typeof(DataGridViewImageColumn)); 838_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)
220if (radioButtonTemplate.Checked && (comboBoxTemplates.SelectedIndex < _templates.Count)) 222return _templates[comboBoxTemplates.SelectedIndex].Template; 621ToggleSave(comboBoxTemplates.SelectedIndex > 0); 797ToggleSave(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)
869if (SelectedIndex == value) 910int index = SelectedIndex; 1174if ((index != -1) && (index != SelectedIndex)) 2092if (itemFound != SelectedIndex) 2232if (DropDownStyle == ComboBoxStyle.DropDownList && SelectedIndex == index) 2383_selectedIndex = SelectedIndex; 2621if (DataManager is not null && DataManager.Position != SelectedIndex) 2624if (!FormattingEnabled || SelectedIndex != -1) 2626DataManager.Position = SelectedIndex; 2976int selectedIndex = SelectedIndex; 3331return SelectedIndex == -1 && base.ShouldSerializeText(); 3428if (SelectedIndex != -1) 3430object? 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)
123if (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;