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