70 references to IndexOf
System.Windows.Forms (18)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (2)
2083int current = DisplayedItems.IndexOf(start); 2878startIndex = 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)
2018int index = ParentInternal.DisplayedItems.IndexOf(this);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (3)
296int IList.IndexOf(object? value) { return IndexOf((ToolStripItem)value!); } 462int indexOfItem = value.ParentInternal.Items.IndexOf(value); 483int 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)
914int indexToInsert = ToolStrip.Items.IndexOf(selectedItem); 1035int itemIndex = ToolStrip.Items.IndexOf(item); 1958int currentIndexOfEditor = ToolStrip.Items.IndexOf(_editorNode); 2124if (_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); 691int endIndexOfSelection = Math.Max(0, parent.Items.IndexOf(item)); 735int startIndexOfSelection = parent.Items.IndexOf(item); 1406if (parentToMoveOn.Items.IndexOf(newSelection) != -1 1407&& parentToMoveOn.Items.IndexOf(newSelection) <= parentToMoveOn.Items.IndexOf(item)) 1449if (parentToMoveOn.Items.IndexOf(newSelection) != -1 1450&& parentToMoveOn.Items.IndexOf(newSelection) >= parentToMoveOn.Items.IndexOf(item))
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (16)
441index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 568index = MenuItem.DropDownItems.IndexOf(_typeHereNode); 636int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 733else if (_typeHereNode is not null && MenuItem.DropDownItems.IndexOf(_typeHereNode) == -1) 949int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 1274int index = MenuItem.DropDownItems.IndexOf(_typeHereNode); 1359int index = MenuItem.DropDownItems.IndexOf(toolItem); 1393return wb.Items.IndexOf(wb.Items[i]); 1712int index = MenuItem.DropDownItems.IndexOf(selectedItem); 1885int itemIndex = ownerItem.DropDownItems.IndexOf(itemToBeDeleted); 2033int currentIndexOfEditor = MenuItem.DropDown.Items.IndexOf(_typeHereNode); 2345int index = MenuItem.DropDownItems.IndexOf(_commitedEditorNode); 2537int maxIndex = Math.Max(ownerDropDown.Items.IndexOf(oldSelection), ownerDropDown.Items.IndexOf(MenuItem)); 2538int 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);