161 references to
System.Windows.Forms (116)
System\Windows\Forms\ContextMenuStrip.cs (1)
66
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (5)
391
ToolStripItem item = Items
[
i];
485
bool spring = (DisplayedItems
[
i] is ToolStripStatusLabel panel && panel.Spring);
486
DisplayedItems
[
i].Anchor = (spring) ? AllAnchor : VerticalAnchor;
532
bool spring = (DisplayedItems
[
i] is ToolStripStatusLabel panel && panel.Spring);
533
DisplayedItems
[
i].Anchor = (spring) ? AllAnchor : HorizontalAnchor;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
1712
Items
[
i].OnOwnerTextDirectionChanged();
1914
Items
[
i].Dispose();
2081
start ??= forward ? DisplayedItems
[
DisplayedItems.Count - 1] : DisplayedItems[0];
2105
return DisplayedItems
[
current];
2108
if (DisplayedItems
[
current].CanKeyboardSelect)
2110
return DisplayedItems
[
current];
2113
while (DisplayedItems
[
current] != start);
2145
ToolStripItem otherItem = DisplayedItems
[
i];
2281
ToolStripItem item = toolStrip.Items
[
j];
2340
ToolStripItem item = toolStrip.Items
[
j];
2406
if (DisplayedItems
[
i].Selected)
2408
selectedItem = DisplayedItems
[
i];
2522
renderer.InitializeItem(Items
[
i]);
2544
if (((DisplayedItems
[
j].DisplayStyle & ToolStripItemDisplayStyle.Text) == ToolStripItemDisplayStyle.Text))
2546
DisplayedItems
[
j].InvalidateItemLayout("ShowKeyboardFocusCues");
2890
ToolStripItem currentItem = DisplayedItems
[
index];
2953
ToolStripItem currentItem = DisplayedItems
[
index];
3144
if (Items
[
i] is not null && Items
[
i].ParentInternal == this)
3146
Items
[
i].OnParentEnabledChanged(e);
3171
Items
[
i].OnOwnerFontChanged(e);
3264
Items
[
j].OnLayout(e);
3501
ToolStripItem item = DisplayedItems
[
i];
3617
Items
[
i].OnParentRightToLeftChanged(e);
3889
if (DisplayedItems
[
i] is null || DisplayedItems
[
i].ParentInternal != this)
3894
bounds = DisplayedItems
[
i].Bounds;
3897
if (_toolStripGrip is not null && DisplayedItems
[
i] == _toolStripGrip)
3904
return DisplayedItems
[
i];
4270
ToolStripItem item = Items
[
j];
4336
ToolStripItem item = Items
[
j];
4701
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (17)
64
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Left)
68
item = owner.Items
[
i];
81
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Right)
85
item = owner.Items
[
i];
130
if (owner.Items
[
i].Available)
170
ToolStripItem item = items
[
fragmentIndex];
217
ToolStripItem item = items
[
i];
237
ToolStripItem item = items
[
i];
313
ToolStripItem item = items
[
index];
349
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Left)
351
if (child.Owner == owner.Items
[
i])
363
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Right)
365
if (child.Owner == owner.Items
[
i])
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (4)
132
if (_owner.DropDownItems
[
i].Available && child.Owner == _owner.DropDownItems
[
i])
155
if (_owner.DropDownItems
[
i].Available)
197
ToolStripItem item = dropDown.DisplayedItems
[
index];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (20)
284
ToolStripItem item = Items
[
i];
483
if ((Items
[
index].Visible && displayRect.Contains(displayRect.X, Items
[
index].Bounds.Top - delta))
484
|| !Items
[
index].Visible)
496
if (displayRect.Contains(displayRect.X, Items
[
index].Bounds.Bottom - delta))
499
delta += (Items
[
index].Bounds.Bottom - delta) - displayRect.Top;
661
if (Items
[
i].Available)
663
Rectangle adjustedLastItemBounds = Items
[
Items.Count - 1].Bounds;
675
deltaToScroll += Items
[
i + 1].Bounds.Top - Items
[
i].Bounds.Top;
679
deltaToScroll += Items
[
i].Bounds.Height;
688
if (Items
[
i].Available)
702
deltaToScroll -= Items
[
i].Bounds.Top - Items
[
i - 1].Bounds.Top;
706
deltaToScroll -= Items
[
i].Bounds.Height;
748
ToolStripItem itemTop = Items
[
_indexOfFirstDisplayedItem - 1];
749
ToolStripItem itemBottom = Items
[
_indexOfFirstDisplayedItem];
761
ToolStripItem itemTop = Items
[
_indexOfFirstDisplayedItem];
762
ToolStripItem itemBottom = Items
[
_indexOfFirstDisplayedItem + 1];
818
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
34
if (_owner.Items
[
i].AllowDrop)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3555
found = ReferenceEquals(items
[
i], this);
3561
neighbors.Add(((IKeyboardToolTip)items
[
previousIndex]).GetNativeScreenRectangle());
3567
neighbors.Add(((IKeyboardToolTip)items
[
nextIndex]).GetNativeScreenRectangle());
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (6)
261
if (itemsToLookIn
[
i] is null)
266
if (WindowsFormsUtils.SafeCompareStrings(itemsToLookIn
[
i].Name, key, ignoreCase: true))
268
foundItems.Add(itemsToLookIn
[
i]);
277
if (itemsToLookIn
[
j] is not ToolStripDropDownItem item)
353
if (WindowsFormsUtils.SafeCompareStrings(this
[
_lastAccessedIndex].Name, key, /* ignoreCase = */ true))
362
if (WindowsFormsUtils.SafeCompareStrings(this
[
i].Name, key, /* ignoreCase = */ true))
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (4)
1040
ToolStripItem candidateItem = destinationItems
[
i];
1052
result = destinationItems
[
source.MergeIndex];
1120
ToolStripItem item = sourceToolStrip.Items
[
itemToLookAt];
1175
MergeRecursive(tsddownSrc.DropDownItems
[
itemToLookAt], tsddownDest.DropDownItems, history);
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
137
ToolStripItem 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)
83
itemNames.Append(toolStrip.Items
[
i].Name ?? "null");
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonExAccessibleObject.cs (1)
82
NavigateDirection.NavigateDirection_LastChild => DropDownItemsCount > 0 ? _owningToolStripSplitButton.DropDown.Items
[
_owningToolStripSplitButton.DropDown.Items.Count - 1].AccessibilityObject : null,
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (9)
74
ToolStripItem item = _owner.Items
[
toolStripItemIndex];
136
ToolStripItem item = _owner.Items
[
i];
174
Rectangle bounds = _owner.DisplayedItems
[
i].Bounds;
175
bounds.Inflate(_owner.DisplayedItems
[
i].Margin.Size);
179
return _owner.Items.IndexOf(_owner.DisplayedItems
[
i]);
187
if (_owner.DisplayedItems
[
i].Alignment == ToolStripItemAlignment.Right)
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\Controls\ToolStrips\ToolStripSplitStackLayout.cs (9)
69
ToolStripItem item = toolStrip.Items
[
ForwardsWalkingIndex];
119
ToolStripItem item = toolStrip.Items
[
ForwardsWalkingIndex];
261
item = toolStrip.Items
[
j];
404
item = toolStrip.Items
[
j];
525
ToolStripItem item = toolStrip.Items
[
i];
549
if (toolStrip.Items
[
i].Placement == ToolStripItemPlacement.Overflow)
551
toolStrip.Items
[
i].ParentInternal = null;
554
toolStrip.Items
[
i].SetPlacement(ToolStripItemPlacement.None);
570
ToolStripItem 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)
1083
IComponent targetSelection = (itemIndex == -1) ? ToolStrip : ToolStrip.Items
[
itemIndex];
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
629
ShowMenu(_dropDown.Items
[
count]);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (1)
420
totalObjects[j++] = parent.Items
[
i];
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
1127
ToolStripItem nextItem = parent.Items
[
currentIndex + 1];
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (7)
698
totalObjects[j++] = parent.Items
[
i];
743
totalObjects[j++] = parent.Items
[
i];
750
SetSelection(parent.Items
[
count - 2]);
1829
targetSelection = !backwards ? collection[0] : (object)collection
[
wb.Items.Count - 1];
1970
targetSelection = collection.Count >= 2 ? collection
[
collection.Count - 2] : GetNextControlInTab(baseCtl, parent, !backwards);
2028
if (parent.Items
[
i] is DesignerToolStripControlHost)
2033
totalObjects[i] = parent.Items
[
i];
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (14)
442
ToolStripItem editedItem = MenuItem.DropDownItems
[
index + 1];
595
? MenuItem.DropDownItems
[
index - 1]
596
: MenuItem.DropDownItems
[
index + 1];
602
if (MenuItem.DropDownItems
[
index] is ToolStripDropDownItem currentItem)
623
_selectionService.SetSelectedComponents(new object[] { MenuItem.DropDownItems
[
index] }, SelectionTypes.Replace);
637
ToolStripItem editedItem = MenuItem.DropDownItems
[
index + 1];
953
if (MenuItem.DropDownItems
[
index] is ToolStripDropDownItem newItem)
1389
Rectangle bounds = wb.Items
[
i].Bounds;
1390
bounds.Inflate(wb.Items
[
i].Margin.Size);
1393
return wb.Items.IndexOf(wb.Items
[
i]);
1931
IComponent targetSelection = (itemIndex == -1) ? ownerItem : ownerItem.DropDownItems
[
itemIndex];
2347
ToolStripDropDownItem editedItem = (ToolStripDropDownItem)MenuItem.DropDownItems
[
index + 1];
2453
KeyboardHandlingService.SelectedDesignerControl = MenuItem.DropDownItems
[
count];
2543
selectedItems[i] = ownerDropDown.Items
[
minIndex];
System\Windows\Forms\Design\ToolStripTemplateNode.cs (2)
1669
if (Items
[
i].Selected)
1671
selectedItem = Items
[
i];
System.Windows.Forms.Tests (18)
BindingNavigatorTests.cs (14)
114
Assert.Equal(bn.MoveFirstItem, bn.Items
[
index++]);
115
Assert.Equal(bn.MovePreviousItem, bn.Items
[
index++]);
116
Assert.NotNull(bn.Items
[
index]);
117
Assert.IsType<ToolStripSeparator>(bn.Items
[
index++]);
118
Assert.Equal(bn.PositionItem, bn.Items
[
index++]);
119
Assert.Equal(bn.CountItem, bn.Items
[
index++]);
120
Assert.NotNull(bn.Items
[
index]);
121
Assert.IsType<ToolStripSeparator>(bn.Items
[
index++]);
122
Assert.Equal(bn.MoveNextItem, bn.Items
[
index++]);
123
Assert.Equal(bn.MoveLastItem, bn.Items
[
index++]);
124
Assert.NotNull(bn.Items
[
index]);
125
Assert.IsType<ToolStripSeparator>(bn.Items
[
index++]);
126
Assert.Equal(bn.AddNewItem, bn.Items
[
index++]);
127
Assert.Equal(bn.DeleteItem, bn.Items
[
index++]);
System\Windows\Forms\ToolStripDropDownTests.cs (4)
4893
items
[
i].SetBounds(0, items
[
i - 1].Bounds.Bottom + 1, items
[
i].Bounds.Width, items
[
i].Bounds.Height);