70 references to IndexOf
System.Windows.Forms (18)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
2085int current = DisplayedItems.IndexOf(start); 2880startIndex = DisplayedItems.IndexOf(startingItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (1)
185int index = dropDown.DisplayedItems.IndexOf(_owner);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (1)
479int index = Items.IndexOf(nextItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (1)
2026int index = ParentInternal.DisplayedItems.IndexOf(this);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (3)
296int IList.IndexOf(object? value) { return IndexOf((ToolStripItem)value!); } 468int indexOfItem = value.ParentInternal.Items.IndexOf(value); 489int indexOfItem = value.ParentInternal.Items.IndexOf(value);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
1196int indexOfDestinationItem = destinationItems.IndexOf(item); 1208maction.PreviousIndex = maction.PreviousIndexCollection.IndexOf(source); 1228maction.PreviousIndex = maction.PreviousIndexCollection.IndexOf(source); 1243maction.PreviousIndex = maction.PreviousIndexCollection.IndexOf(source);
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemAccessibleObject.cs (1)
70int index = displayedItems.IndexOf(_owningToolStripMenuItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (5)
116if (_owner.Items.IndexOf(droppedItem) < insertIndex) 179return _owner.Items.IndexOf(_owner.DisplayedItems[i]); 191return _owner.Items.IndexOf(_owner.DisplayedItems[i - 1]); 194return _owner.Items.IndexOf(_owner.DisplayedItems[i]); 198return _owner.Items.IndexOf(_owner.DisplayedItems[_owner.DisplayedItems.Count - 1]);
System.Windows.Forms.Design (48)
System\Windows\Forms\Design\BaseContextMenuStrip.cs (1)
74index = Items.IndexOf(_selectionMenuItem);
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
68int dummyIndex = parent.Items.IndexOf(_currentItem);
System\Windows\Forms\Design\ToolStripDesigner.cs (4)
921int indexToInsert = ToolStrip.Items.IndexOf(selectedItem); 1042int itemIndex = ToolStrip.Items.IndexOf(item); 1977int currentIndexOfEditor = ToolStrip.Items.IndexOf(_editorNode); 2143if (_editorNode is not null && (ToolStrip.Items.IndexOf(_editorNode) == -1))
System\Windows\Forms\Design\ToolStripItemBehavior.cs (8)
405int startIndexOfSelection = Math.Min(parent.Items.IndexOf(selectedItem), parent.Items.IndexOf(glyphItem)); 406int endIndexOfSelection = Math.Max(parent.Items.IndexOf(selectedItem), parent.Items.IndexOf(glyphItem)); 736int indexOfItemUnderMouseToDrop = parentToolStrip.Items.IndexOf(ToolStripDesigner.s_dragItem); 742indexOfPrimarySelection = parentToolStrip.Items.IndexOf(selectedItem); 987parentDesigner.IndexOfItemUnderMouseToDrag = parentToolStrip.Items.IndexOf(glyphItem); 1010ownerItemDesigner._indexOfItemUnderMouseToDrag = parentDropDown.Items.IndexOf(glyphItem);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (4)
374int dummyIndex = parent.Items.IndexOf(_currentItem); 436int dummyIndex = parent.Items.IndexOf(_currentItem); 475int dummyIndex = parent.Items.IndexOf(_currentItem); 515int dummyIndex = parent.Items.IndexOf(_currentItem);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (3)
733int dummyIndex = parent.Items.IndexOf(ToolStripItem); 955focusIndex = owner.Items.IndexOf(currentSelection); 1126int currentIndex = parent.Items.IndexOf(ToolStripItem);
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (9)
180focusIndex = owner.Items.IndexOf(curDesignerNode); 707int endIndexOfSelection = Math.Max(0, parent.Items.IndexOf(item)); 751int startIndexOfSelection = parent.Items.IndexOf(item); 1417if (parentToMoveOn.Items.IndexOf(newSelection) != -1 && parentToMoveOn.Items.IndexOf(newSelection) <= parentToMoveOn.Items.IndexOf(item)) 1462if (parentToMoveOn.Items.IndexOf(newSelection) != -1 && parentToMoveOn.Items.IndexOf(newSelection) >= parentToMoveOn.Items.IndexOf(item))
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (16)
441index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 572index = MenuItem.DropDownItems.IndexOf(_typeHereNode); 646int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 743else if (_typeHereNode is not null && MenuItem.DropDownItems.IndexOf(_typeHereNode) == -1) 965int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 1290int index = MenuItem.DropDownItems.IndexOf(_typeHereNode); 1375int index = MenuItem.DropDownItems.IndexOf(toolItem); 1409return wb.Items.IndexOf(wb.Items[i]); 1728int index = MenuItem.DropDownItems.IndexOf(selectedItem); 1901int itemIndex = ownerItem.DropDownItems.IndexOf(itemToBeDeleted); 2049int currentIndexOfEditor = MenuItem.DropDown.Items.IndexOf(_typeHereNode); 2361int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 2553int maxIndex = Math.Max(ownerDropDown.Items.IndexOf(oldSelection), ownerDropDown.Items.IndexOf(MenuItem)); 2554int minIndex = Math.Min(ownerDropDown.Items.IndexOf(oldSelection), ownerDropDown.Items.IndexOf(MenuItem));
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
901int index = _miniToolStrip.Items.IndexOf(_centerLabel); 944int index = _miniToolStrip.Items.IndexOf(_centerTextBox);
System.Windows.Forms.Tests (4)
System\Windows\Forms\ToolStripItemCollectionTests.cs (4)
312collection.IndexOf(items[2]).Should().Be(1); 313collection.IndexOf(items[0]).Should().Be(0); 314collection.IndexOf(items[1]).Should().Be(2); 331collection.IndexOf(items[0]).Should().Be(0);