163 references to
System.Windows.Forms (117)
System\Windows\Forms\ContextMenuStrip.cs (1)
66
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (5)
383
ToolStripItem item = Items
[
i];
477
bool spring = (DisplayedItems
[
i] is ToolStripStatusLabel panel && panel.Spring);
478
DisplayedItems
[
i].Anchor = (spring) ? AllAnchor : VerticalAnchor;
524
bool spring = (DisplayedItems
[
i] is ToolStripStatusLabel panel && panel.Spring);
525
DisplayedItems
[
i].Anchor = (spring) ? AllAnchor : HorizontalAnchor;
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (32)
1714
Items
[
i].OnOwnerTextDirectionChanged();
1916
Items
[
i].Dispose();
2083
start ??= forward ? DisplayedItems
[
DisplayedItems.Count - 1] : DisplayedItems[0];
2107
return DisplayedItems
[
current];
2110
if (DisplayedItems
[
current].CanKeyboardSelect)
2112
return DisplayedItems
[
current];
2115
while (DisplayedItems
[
current] != start);
2147
ToolStripItem otherItem = DisplayedItems
[
i];
2283
ToolStripItem item = toolStrip.Items
[
j];
2342
ToolStripItem item = toolStrip.Items
[
j];
2408
if (DisplayedItems
[
i].Selected)
2410
selectedItem = DisplayedItems
[
i];
2524
renderer.InitializeItem(Items
[
i]);
2546
if (((DisplayedItems
[
j].DisplayStyle & ToolStripItemDisplayStyle.Text) == ToolStripItemDisplayStyle.Text))
2548
DisplayedItems
[
j].InvalidateItemLayout("ShowKeyboardFocusCues");
2892
ToolStripItem currentItem = DisplayedItems
[
index];
2955
ToolStripItem currentItem = DisplayedItems
[
index];
3146
if (Items
[
i] is not null && Items
[
i].ParentInternal == this)
3148
Items
[
i].OnParentEnabledChanged(e);
3173
Items
[
i].OnOwnerFontChanged(e);
3266
Items
[
j].OnLayout(e);
3503
ToolStripItem item = DisplayedItems
[
i];
3618
Items
[
i].OnParentRightToLeftChanged(e);
3890
if (DisplayedItems
[
i] is null || DisplayedItems
[
i].ParentInternal != this)
3895
bounds = DisplayedItems
[
i].Bounds;
3898
if (_toolStripGrip is not null && DisplayedItems
[
i] == _toolStripGrip)
3905
return DisplayedItems
[
i];
4269
ToolStripItem item = Items
[
j];
4335
ToolStripItem item = Items
[
j];
4712
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (17)
65
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Left)
69
item = owner.Items
[
i];
82
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Right)
86
item = owner.Items
[
i];
131
if (owner.Items
[
i].Available)
171
ToolStripItem item = items
[
fragmentIndex];
218
ToolStripItem item = items
[
i];
238
ToolStripItem item = items
[
i];
314
ToolStripItem item = items
[
index];
350
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Left)
352
if (child.Owner == owner.Items
[
i])
364
if (owner.Items
[
i].Available && owner.Items
[
i].Alignment == ToolStripItemAlignment.Right)
366
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;
665
if (Items
[
i].Available)
667
Rectangle adjustedLastItemBounds = Items
[
Items.Count - 1].Bounds;
679
deltaToScroll += Items
[
i + 1].Bounds.Top - Items
[
i].Bounds.Top;
683
deltaToScroll += Items
[
i].Bounds.Height;
692
if (Items
[
i].Available)
706
deltaToScroll -= Items
[
i].Bounds.Top - Items
[
i - 1].Bounds.Top;
710
deltaToScroll -= Items
[
i].Bounds.Height;
752
ToolStripItem itemTop = Items
[
_indexOfFirstDisplayedItem - 1];
753
ToolStripItem itemBottom = Items
[
_indexOfFirstDisplayedItem];
766
ToolStripItem itemTop = Items
[
_indexOfFirstDisplayedItem];
767
ToolStripItem itemBottom = Items
[
_indexOfFirstDisplayedItem + 1];
823
ToolStripItem item = Items
[
i];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (1)
35
if (_owner.Items
[
i].AllowDrop)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (3)
3563
found = ReferenceEquals(items
[
i], this);
3569
neighbors.Add(((IKeyboardToolTip)items
[
previousIndex]).GetNativeScreenRectangle());
3575
neighbors.Add(((IKeyboardToolTip)items
[
nextIndex]).GetNativeScreenRectangle());
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (7)
153
Add(toolStripItems
[
i--]);
254
if (itemsToLookIn
[
i] is null)
259
if (WindowsFormsUtils.SafeCompareStrings(itemsToLookIn
[
i].Name, key, ignoreCase: true))
261
foundItems.Add(itemsToLookIn
[
i]);
270
if (itemsToLookIn
[
j] is not ToolStripDropDownItem item)
346
if (WindowsFormsUtils.SafeCompareStrings(this
[
_lastAccessedIndex].Name, key, /* ignoreCase = */ true))
355
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)
1090
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)
714
totalObjects[j++] = parent.Items
[
i];
759
totalObjects[j++] = parent.Items
[
i];
766
SetSelection(parent.Items
[
count - 2]);
1846
targetSelection = !backwards ? collection[0] : (object)collection
[
wb.Items.Count - 1];
1987
targetSelection = collection.Count >= 2 ? collection
[
collection.Count - 2] : GetNextControlInTab(baseCtl, parent, !backwards);
2045
if (parent.Items
[
i] is DesignerToolStripControlHost)
2050
totalObjects[i] = parent.Items
[
i];
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (14)
442
ToolStripItem editedItem = MenuItem.DropDownItems
[
index + 1];
601
nextItem = MenuItem.DropDownItems
[
index - 1];
605
nextItem = MenuItem.DropDownItems
[
index + 1];
612
if (MenuItem.DropDownItems
[
index] is ToolStripDropDownItem currentItem)
633
_selectionService.SetSelectedComponents(new object[] { MenuItem.DropDownItems
[
index] }, SelectionTypes.Replace);
647
ToolStripItem editedItem = MenuItem.DropDownItems
[
index + 1];
969
if (MenuItem.DropDownItems
[
index] is ToolStripDropDownItem newItem)
1405
Rectangle bounds = wb.Items
[
i].Bounds;
1406
bounds.Inflate(wb.Items
[
i].Margin.Size);
1409
return wb.Items.IndexOf(wb.Items
[
i]);
1947
IComponent targetSelection = (itemIndex == -1) ? ownerItem : ownerItem.DropDownItems
[
itemIndex];
2363
ToolStripDropDownItem editedItem = (ToolStripDropDownItem)MenuItem.DropDownItems
[
index + 1];
2469
KeyboardHandlingService.SelectedDesignerControl = MenuItem.DropDownItems
[
count];
2559
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 (19)
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);
System\Windows\Forms\ToolStripTests.cs (1)
7357
listToolStripMenuItem.DropDownItems
[
listToolStripMenuItem.DropDownItems.Count - 1].Dispose();