161 references to
System.Windows.Forms (116)
System\Windows\Forms\ContextMenuStrip.cs (1)
66ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (5)
391ToolStripItem item = Items[i]; 485bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 486DisplayedItems[i].Anchor = (spring) ? AllAnchor : VerticalAnchor; 532bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 533DisplayedItems[i].Anchor = (spring) ? AllAnchor : HorizontalAnchor;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
1712Items[i].OnOwnerTextDirectionChanged(); 1914Items[i].Dispose(); 2081start ??= forward ? DisplayedItems[DisplayedItems.Count - 1] : DisplayedItems[0]; 2105return DisplayedItems[current]; 2108if (DisplayedItems[current].CanKeyboardSelect) 2110return DisplayedItems[current]; 2113while (DisplayedItems[current] != start); 2145ToolStripItem otherItem = DisplayedItems[i]; 2281ToolStripItem item = toolStrip.Items[j]; 2340ToolStripItem item = toolStrip.Items[j]; 2406if (DisplayedItems[i].Selected) 2408selectedItem = DisplayedItems[i]; 2522renderer.InitializeItem(Items[i]); 2544if (((DisplayedItems[j].DisplayStyle & ToolStripItemDisplayStyle.Text) == ToolStripItemDisplayStyle.Text)) 2546DisplayedItems[j].InvalidateItemLayout("ShowKeyboardFocusCues"); 2890ToolStripItem currentItem = DisplayedItems[index]; 2953ToolStripItem currentItem = DisplayedItems[index]; 3144if (Items[i] is not null && Items[i].ParentInternal == this) 3146Items[i].OnParentEnabledChanged(e); 3171Items[i].OnOwnerFontChanged(e); 3264Items[j].OnLayout(e); 3501ToolStripItem item = DisplayedItems[i]; 3617Items[i].OnParentRightToLeftChanged(e); 3889if (DisplayedItems[i] is null || DisplayedItems[i].ParentInternal != this) 3894bounds = DisplayedItems[i].Bounds; 3897if (_toolStripGrip is not null && DisplayedItems[i] == _toolStripGrip) 3904return DisplayedItems[i]; 4270ToolStripItem item = Items[j]; 4336ToolStripItem item = Items[j]; 4701ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (17)
64if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Left) 68item = owner.Items[i]; 81if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Right) 85item = owner.Items[i]; 130if (owner.Items[i].Available) 170ToolStripItem item = items[fragmentIndex]; 217ToolStripItem item = items[i]; 237ToolStripItem item = items[i]; 313ToolStripItem item = items[index]; 349if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Left) 351if (child.Owner == owner.Items[i]) 363if (owner.Items[i].Available && owner.Items[i].Alignment == ToolStripItemAlignment.Right) 365if (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; 661if (Items[i].Available) 663Rectangle adjustedLastItemBounds = Items[Items.Count - 1].Bounds; 675deltaToScroll += Items[i + 1].Bounds.Top - Items[i].Bounds.Top; 679deltaToScroll += Items[i].Bounds.Height; 688if (Items[i].Available) 702deltaToScroll -= Items[i].Bounds.Top - Items[i - 1].Bounds.Top; 706deltaToScroll -= Items[i].Bounds.Height; 748ToolStripItem itemTop = Items[_indexOfFirstDisplayedItem - 1]; 749ToolStripItem itemBottom = Items[_indexOfFirstDisplayedItem]; 761ToolStripItem itemTop = Items[_indexOfFirstDisplayedItem]; 762ToolStripItem itemBottom = Items[_indexOfFirstDisplayedItem + 1]; 818ToolStripItem item = Items[i];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
34if (_owner.Items[i].AllowDrop)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3555found = ReferenceEquals(items[i], this); 3561neighbors.Add(((IKeyboardToolTip)items[previousIndex]).GetNativeScreenRectangle()); 3567neighbors.Add(((IKeyboardToolTip)items[nextIndex]).GetNativeScreenRectangle());
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (6)
261if (itemsToLookIn[i] is null) 266if (WindowsFormsUtils.SafeCompareStrings(itemsToLookIn[i].Name, key, ignoreCase: true)) 268foundItems.Add(itemsToLookIn[i]); 277if (itemsToLookIn[j] is not ToolStripDropDownItem item) 353if (WindowsFormsUtils.SafeCompareStrings(this[_lastAccessedIndex].Name, key, /* ignoreCase = */ true)) 362if (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)
1083IComponent 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)
698totalObjects[j++] = parent.Items[i]; 743totalObjects[j++] = parent.Items[i]; 750SetSelection(parent.Items[count - 2]); 1829targetSelection = !backwards ? collection[0] : (object)collection[wb.Items.Count - 1]; 1970targetSelection = collection.Count >= 2 ? collection[collection.Count - 2] : GetNextControlInTab(baseCtl, parent, !backwards); 2028if (parent.Items[i] is DesignerToolStripControlHost) 2033totalObjects[i] = parent.Items[i];
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (14)
442ToolStripItem editedItem = MenuItem.DropDownItems[index + 1]; 595? MenuItem.DropDownItems[index - 1] 596: MenuItem.DropDownItems[index + 1]; 602if (MenuItem.DropDownItems[index] is ToolStripDropDownItem currentItem) 623_selectionService.SetSelectedComponents(new object[] { MenuItem.DropDownItems[index] }, SelectionTypes.Replace); 637ToolStripItem editedItem = MenuItem.DropDownItems[index + 1]; 953if (MenuItem.DropDownItems[index] is ToolStripDropDownItem newItem) 1389Rectangle bounds = wb.Items[i].Bounds; 1390bounds.Inflate(wb.Items[i].Margin.Size); 1393return wb.Items.IndexOf(wb.Items[i]); 1931IComponent targetSelection = (itemIndex == -1) ? ownerItem : ownerItem.DropDownItems[itemIndex]; 2347ToolStripDropDownItem editedItem = (ToolStripDropDownItem)MenuItem.DropDownItems[index + 1]; 2453KeyboardHandlingService.SelectedDesignerControl = MenuItem.DropDownItems[count]; 2543selectedItems[i] = ownerDropDown.Items[minIndex];
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1669if (Items[i].Selected) 1671selectedItem = Items[i];
System.Windows.Forms.Tests (18)
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);