163 references to
System.Windows.Forms (117)
System\Windows\Forms\ContextMenuStrip.cs (1)
66ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (5)
383ToolStripItem item = Items[i]; 477bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 478DisplayedItems[i].Anchor = (spring) ? AllAnchor : VerticalAnchor; 524bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 525DisplayedItems[i].Anchor = (spring) ? AllAnchor : HorizontalAnchor;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
1714Items[i].OnOwnerTextDirectionChanged(); 1916Items[i].Dispose(); 2083start ??= forward ? DisplayedItems[DisplayedItems.Count - 1] : DisplayedItems[0]; 2107return DisplayedItems[current]; 2110if (DisplayedItems[current].CanKeyboardSelect) 2112return DisplayedItems[current]; 2115while (DisplayedItems[current] != start); 2147ToolStripItem otherItem = DisplayedItems[i]; 2283ToolStripItem item = toolStrip.Items[j]; 2342ToolStripItem item = toolStrip.Items[j]; 2408if (DisplayedItems[i].Selected) 2410selectedItem = DisplayedItems[i]; 2524renderer.InitializeItem(Items[i]); 2546if (((DisplayedItems[j].DisplayStyle & ToolStripItemDisplayStyle.Text) == ToolStripItemDisplayStyle.Text)) 2548DisplayedItems[j].InvalidateItemLayout("ShowKeyboardFocusCues"); 2892ToolStripItem currentItem = DisplayedItems[index]; 2955ToolStripItem currentItem = DisplayedItems[index]; 3146if (Items[i] is not null && Items[i].ParentInternal == this) 3148Items[i].OnParentEnabledChanged(e); 3173Items[i].OnOwnerFontChanged(e); 3266Items[j].OnLayout(e); 3503ToolStripItem item = DisplayedItems[i]; 3618Items[i].OnParentRightToLeftChanged(e); 3890if (DisplayedItems[i] is null || DisplayedItems[i].ParentInternal != this) 3895bounds = DisplayedItems[i].Bounds; 3898if (_toolStripGrip is not null && DisplayedItems[i] == _toolStripGrip) 3905return DisplayedItems[i]; 4269ToolStripItem item = Items[j]; 4335ToolStripItem item = Items[j]; 4712ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (17)
65if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Left) 69item = owner.Items[i]; 82if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Right) 86item = owner.Items[i]; 131if (owner.Items[i].Available) 171ToolStripItem item = items[fragmentIndex]; 218ToolStripItem item = items[i]; 238ToolStripItem item = items[i]; 314ToolStripItem item = items[index]; 350if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Left) 352if (child.Owner == owner.Items[i]) 364if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Right) 366if (child.Owner == owner.Items[i])
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (4)
132if (_owner.DropDownItems[i].Available && child.Owner == _owner.DropDownItems[i]) 155if (_owner.DropDownItems[i].Available) 197ToolStripItem item = dropDown.DisplayedItems[index];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (20)
284ToolStripItem item = Items[i]; 483if ((Items[index].Visible && displayRect.Contains(displayRect.X, Items[index].Bounds.Top - delta)) 484|| !Items[index].Visible) 496if (displayRect.Contains(displayRect.X, Items[index].Bounds.Bottom - delta)) 499delta += (Items[index].Bounds.Bottom - delta) - displayRect.Top; 665if (Items[i].Available) 667Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 679deltaToScroll += Items[i + 1].Bounds.Top - Items[i].Bounds.Top; 683deltaToScroll += Items[i].Bounds.Height; 692if (Items[i].Available) 706deltaToScroll -= Items[i].Bounds.Top - Items[i - 1].Bounds.Top; 710deltaToScroll -= Items[i].Bounds.Height; 752ToolStripItem itemTop = Items[_indexOfFirstDisplayedItem - 1]; 753ToolStripItem itemBottom = Items[_indexOfFirstDisplayedItem]; 766ToolStripItem itemTop = Items[_indexOfFirstDisplayedItem]; 767ToolStripItem itemBottom = Items[_indexOfFirstDisplayedItem + 1]; 823ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
35if (_owner.Items[i].AllowDrop)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3563found = ReferenceEquals(items[i], this); 3569neighbors.Add(((IKeyboardToolTip)items[previousIndex]).GetNativeScreenRectangle()); 3575neighbors.Add(((IKeyboardToolTip)items[nextIndex]).GetNativeScreenRectangle());
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (7)
153Add(toolStripItems[i--]); 254if (itemsToLookIn[i] is null) 259if (WindowsFormsUtils.SafeCompareStrings(itemsToLookIn[i].Name, key, ignoreCase: true)) 261foundItems.Add(itemsToLookIn[i]); 270if (itemsToLookIn[j] is not ToolStripDropDownItem item) 346if (WindowsFormsUtils.SafeCompareStrings(this[_lastAccessedIndex].Name, key, /* ignoreCase = */ true)) 355if (WindowsFormsUtils.SafeCompareStrings(this[i].Name, key, /* ignoreCase = */ true))
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
1040ToolStripItem candidateItem = destinationItems[i]; 1052result = destinationItems[source.MergeIndex]; 1120ToolStripItem item = sourceToolStrip.Items[itemToLookAt]; 1175MergeRecursive(tsddownSrc.DropDownItems[itemToLookAt], tsddownDest.DropDownItems, history);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
137ToolStripItem item = DisplayedItems[j];
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.ToolStripOverflowAccessibleObject.cs (1)
18? owner.DisplayedItems[index].AccessibilityObject
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (1)
83itemNames.Append(toolStrip.Items[i].Name ?? "null");
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonExAccessibleObject.cs (1)
82NavigateDirection.NavigateDirection_LastChild => DropDownItemsCount > 0 ? _owningToolStripSplitButton.DropDown.Items[_owningToolStripSplitButton.DropDown.Items.Count - 1].AccessibilityObject : null,
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (9)
74ToolStripItem item = _owner.Items[toolStripItemIndex]; 136ToolStripItem item = _owner.Items[i]; 174Rectangle bounds = _owner.DisplayedItems[i].Bounds; 175bounds.Inflate(_owner.DisplayedItems[i].Margin.Size); 179return _owner.Items.IndexOf(_owner.DisplayedItems[i]); 187if (_owner.DisplayedItems[i].Alignment == ToolStripItemAlignment.Right) 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\Controls\ToolStrips\ToolStripSplitStackLayout.cs (9)
69ToolStripItem item = toolStrip.Items[ForwardsWalkingIndex]; 119ToolStripItem item = toolStrip.Items[ForwardsWalkingIndex]; 261item = toolStrip.Items[j]; 404item = toolStrip.Items[j]; 525ToolStripItem item = toolStrip.Items[i]; 549if (toolStrip.Items[i].Placement == ToolStripItemPlacement.Overflow) 551toolStrip.Items[i].ParentInternal = null; 554toolStrip.Items[i].SetPlacement(ToolStripItemPlacement.None); 570ToolStripItem item = ToolStrip.Items[BackwardsWalkingIndex];
System\Windows\Forms\Form.cs (1)
6289!(sourceMenuStrip.MdiWindowListItem.DropDownItems[nSubItems - 1] is ToolStripSeparator));
System.Windows.Forms.Design (27)
System\Windows\Forms\Design\ToolStripDesigner.cs (1)
1090IComponent targetSelection = (itemIndex == -1) ? ToolStrip : ToolStrip.Items[itemIndex];
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
629ShowMenu(_dropDown.Items[count]);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
420totalObjects[j++] = parent.Items[i];
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
1127ToolStripItem nextItem = parent.Items[currentIndex + 1];
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (7)
714totalObjects[j++] = parent.Items[i]; 759totalObjects[j++] = parent.Items[i]; 766SetSelection(parent.Items[count - 2]); 1846targetSelection = !backwards ? collection[0] : (object)collection[wb.Items.Count - 1]; 1987targetSelection = collection.Count >= 2 ? collection[collection.Count - 2] : GetNextControlInTab(baseCtl, parent, !backwards); 2045if (parent.Items[i] is DesignerToolStripControlHost) 2050totalObjects[i] = parent.Items[i];
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (14)
442ToolStripItem editedItem = MenuItem.DropDownItems[index + 1]; 601nextItem = MenuItem.DropDownItems[index - 1]; 605nextItem = MenuItem.DropDownItems[index + 1]; 612if (MenuItem.DropDownItems[index] is ToolStripDropDownItem currentItem) 633_selectionService.SetSelectedComponents(new object[] { MenuItem.DropDownItems[index] }, SelectionTypes.Replace); 647ToolStripItem editedItem = MenuItem.DropDownItems[index + 1]; 969if (MenuItem.DropDownItems[index] is ToolStripDropDownItem newItem) 1405Rectangle bounds = wb.Items[i].Bounds; 1406bounds.Inflate(wb.Items[i].Margin.Size); 1409return wb.Items.IndexOf(wb.Items[i]); 1947IComponent targetSelection = (itemIndex == -1) ? ownerItem : ownerItem.DropDownItems[itemIndex]; 2363ToolStripDropDownItem editedItem = (ToolStripDropDownItem)MenuItem.DropDownItems[index + 1]; 2469KeyboardHandlingService.SelectedDesignerControl = MenuItem.DropDownItems[count]; 2559selectedItems[i] = ownerDropDown.Items[minIndex];
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1669if (Items[i].Selected) 1671selectedItem = Items[i];
System.Windows.Forms.Tests (19)
BindingNavigatorTests.cs (14)
114Assert.Equal(bn.MoveFirstItem, bn.Items[index++]); 115Assert.Equal(bn.MovePreviousItem, bn.Items[index++]); 116Assert.NotNull(bn.Items[index]); 117Assert.IsType<ToolStripSeparator>(bn.Items[index++]); 118Assert.Equal(bn.PositionItem, bn.Items[index++]); 119Assert.Equal(bn.CountItem, bn.Items[index++]); 120Assert.NotNull(bn.Items[index]); 121Assert.IsType<ToolStripSeparator>(bn.Items[index++]); 122Assert.Equal(bn.MoveNextItem, bn.Items[index++]); 123Assert.Equal(bn.MoveLastItem, bn.Items[index++]); 124Assert.NotNull(bn.Items[index]); 125Assert.IsType<ToolStripSeparator>(bn.Items[index++]); 126Assert.Equal(bn.AddNewItem, bn.Items[index++]); 127Assert.Equal(bn.DeleteItem, bn.Items[index++]);
System\Windows\Forms\ToolStripDropDownTests.cs (4)
4893items[i].SetBounds(0, items[i - 1].Bounds.Bottom + 1, items[i].Bounds.Width, items[i].Bounds.Height);
System\Windows\Forms\ToolStripTests.cs (1)
7357listToolStripMenuItem.DropDownItems[listToolStripMenuItem.DropDownItems.Count - 1].Dispose();