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