1 override of Items
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
34
public override ToolStripItemCollection
Items
350 references to Items
System.Windows.Forms (188)
System\Windows\Forms\ContextMenuStrip.cs (4)
64
for (int i = 0; i <
Items
.Count; i++)
66
ToolStripItem item =
Items
[i];
70
contextMenuStrip.
Items
.Add(new ToolStripSeparator());
74
contextMenuStrip.
Items
.Add(toolStripMenuItem.Clone());
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.cs (4)
3237
if (_toolStrip.
Items
.Count > 0)
3843
List<ToolStripItem> buttonList = fullRebuild ? new() : new(_toolStrip.
Items
.OfType<ToolStripItem>());
3970
_toolStrip.
Items
.Clear();
3973
_toolStrip.
Items
.Add(buttonList[j]);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (2)
390
for (int i = 0; i <
Items
.Count; i++)
392
ToolStripItem item =
Items
[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (43)
21
[DefaultProperty(nameof(
Items
))]
158
Items
.AddRange(items);
872
foreach (ToolStripItem item in
Items
)
932
LayoutTransaction.DoLayoutIf((
Items
.Count > 0), this, this, PropertyNames.ImageScalingSize);
933
foreach (ToolStripItem item in
Items
)
968
foreach (ToolStripItem item in
Items
)
1617
foreach (ToolStripItem item in
Items
)
1703
for (int i = 0; i <
Items
.Count; i++)
1705
Items
[i].OnOwnerTextDirectionChanged();
1902
if (!
Items
.IsReadOnly)
1905
for (int i =
Items
.Count - 1; i >= 0; i--)
1907
Items
[i].Dispose();
1910
Items
.Clear();
2272
for (int j = 0; j < toolStrip.
Items
.Count; j++)
2274
ToolStripItem item = toolStrip.
Items
[j];
2293
if (toolStrip.
Items
.Count == 0 || (!foundItemParticipatingInLayout))
2331
for (int j = 0; j < toolStrip.
Items
.Count; j++)
2333
ToolStripItem item = toolStrip.
Items
[j];
2352
if (toolStrip.
Items
.Count == 0 || !foundItemParticipatingInLayout)
2513
for (int i = 0; i <
Items
.Count; i++)
2515
renderer.InitializeItem(
Items
[i]);
2692
foreach (ToolStripItem item in
Items
)
3135
for (int i = 0; i <
Items
.Count; i++)
3137
if (
Items
[i] is not null &&
Items
[i].ParentInternal == this)
3139
Items
[i].OnParentEnabledChanged(e);
3162
for (int i = 0; i <
Items
.Count; i++)
3164
Items
[i].OnOwnerFontChanged(e);
3255
for (int j = 0; j <
Items
.Count; j++)
3257
Items
[j].OnLayout(e);
3609
for (int i = 0; i <
Items
.Count; i++)
3611
Items
[i].OnParentRightToLeftChanged(e);
3745
foreach (ToolStripItem item in
Items
)
3921
ReleaseToolStripItemsProviders(
Items
);
4048
foreach (ToolStripItem item in
Items
)
4269
for (; j >= 0 && j <
Items
.Count; j = (pass == 0) ? j + 1 : j - 1)
4271
ToolStripItem item =
Items
[j];
4332
for (int j = 0; j <
Items
.Count; j++)
4334
ToolStripItem item =
Items
[j];
4477
return $"{base.ToString()}, Name: {Name}, Items: {
Items
.Count}";
4680
get { return
Items
; }
4726
int i =
Items
.Count;
4729
ToolStripItem item =
Items
[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (25)
42
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
56
if (index < owner.
Items
.Count)
62
for (int i = 0; i < owner.
Items
.Count; ++i)
64
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Left)
68
item = owner.
Items
[i];
79
for (int i = 0; i < owner.
Items
.Count; ++i)
81
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Right)
85
item = owner.
Items
[i];
108
if (owner.CanOverflow && owner.OverflowButton.Visible && index == owner.
Items
.Count)
122
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
128
for (int i = 0; i < owner.
Items
.Count; i++)
130
if (owner.
Items
[i].Available)
280
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
325
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
343
return owner.
Items
.Count + index;
347
for (int i = 0; i < owner.
Items
.Count; ++i)
349
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Left)
351
if (child.Owner == owner.
Items
[i])
361
for (int i = 0; i < owner.
Items
.Count; ++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\ToolStripDropDownItem.cs (2)
245
=> DropDown.
Items
;
781
foreach (ToolStripItem childItem in item.DropDown.
Items
)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (36)
266
managedDropDown.
Items
.Add(itemToAdd);
282
for (int i = 0; i <
Items
.Count; i++)
284
ToolStripItem item =
Items
[i];
481
int index =
Items
.IndexOf(nextItem);
488
Rectangle adjustedItemBounds =
Items
[index].Bounds;
492
if ((
Items
[index].Visible && IsItemIntersectingDisplayRectangle(displayRect, adjustedItemBounds))
493
|| !
Items
[index].Visible)
507
Rectangle adjustedItemBounds =
Items
[index].Bounds;
631
if (
Items
.Count > 0)
633
int delta =
Items
[0].Bounds.Top - DisplayRectangle.Top;
654
if (!RequiresScrollButtons ||
Items
.Count == 0)
666
int alreadyScrolled = displayRectangle.Top -
Items
[0].Bounds.Top;
673
for (int i = 0; i <
Items
.Count && deltaToScroll < requiredScrollAmount; ++i)
675
if (
Items
[i].Available)
677
Rectangle adjustedLastItemBounds =
Items
[
Items
.Count - 1].Bounds;
689
if (i <
Items
.Count - 1)
691
deltaToScroll +=
Items
[i + 1].Bounds.Top -
Items
[i].Bounds.Top;
695
deltaToScroll +=
Items
[i].Bounds.Height;
702
for (int i =
Items
.Count - 1; i >= 0 && deltaToScroll > requiredScrollAmount; --i)
704
if (
Items
[i].Available)
706
Rectangle adjustedLastItemBounds =
Items
[0].Bounds;
717
deltaToScroll -=
Items
[i].Bounds.Top -
Items
[i - 1].Bounds.Top;
721
deltaToScroll -=
Items
[i].Bounds.Height;
728
_scrollAmount = DisplayRectangle.Top -
Items
[0].Bounds.Top;
755
if (_indexOfFirstDisplayedItem == -1 || _indexOfFirstDisplayedItem >=
Items
.Count)
773
ToolStripItem itemTop =
Items
[_indexOfFirstDisplayedItem - 1];
774
ToolStripItem itemBottom =
Items
[_indexOfFirstDisplayedItem];
781
Debug.Assert(_indexOfFirstDisplayedItem <
Items
.Count - 1,
784
if (_indexOfFirstDisplayedItem >=
Items
.Count - 1)
789
ToolStripItem itemTop =
Items
[_indexOfFirstDisplayedItem];
790
ToolStripItem itemBottom =
Items
[_indexOfFirstDisplayedItem + 1];
849
for (int i = 0; i <
Items
.Count; ++i)
851
ToolStripItem item =
Items
[i];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropTargetManager.cs (2)
33
for (int i = 0; i < _owner.
Items
.Count; i++)
35
if (_owner.
Items
[i].AllowDrop)
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (5)
1417
_owner?.
Items
.Remove(this);
1419
value?.
Items
.Add(this);
2062
if (ParentInternal is not null && ParentInternal.
Items
.Contains(this) && ParentInternal.AllowItemReorder)
2099
Debug.Assert(Owner.
Items
.Contains(this), "How can there be a owner and not be in the collection?");
2100
Owner.
Items
.Remove(this);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (5)
469
int indexOfItem = value.ParentInternal.
Items
.IndexOf(value);
472
value.ParentInternal.
Items
.RemoveAt(indexOfItem);
490
int indexOfItem = value.ParentInternal.
Items
.IndexOf(value);
494
value.ParentInternal.
Items
.RemoveAt(indexOfItem);
512
item.Owner?.
Items
.Remove(item);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (9)
199
foreach (ToolStripItem item in toolStrip.
Items
)
1091
int originalCount = sourceToolStrip.
Items
.Count;
1104
ToolStripItem item = sourceToolStrip.
Items
[itemToLookAt];
1105
MergeRecursive(item, targetToolStrip.
Items
, mergeHistory.MergeHistoryItemsStack);
1107
int numberOfItemsMerged = lastCount - sourceToolStrip.
Items
.Count;
1109
lastCount = sourceToolStrip.
Items
.Count;
1190
PreviousIndexCollection = source.Owner!.
Items
1210
PreviousIndexCollection = source.Owner!.
Items
1225
PreviousIndexCollection = source.Owner!.
Items
System\Windows\Forms\Controls\ToolStrips\ToolStripScrollButton.StickyLabelAccessibleObject.cs (4)
31
=> _owner.UpDirection && toolStripDropDownMenu.
Items
.Count > 0
32
? toolStripDropDownMenu.
Items
[0].AccessibilityObject
35
=> !_owner.UpDirection && toolStripDropDownMenu.
Items
.Count > 0
36
? toolStripDropDownMenu.
Items
[^1].AccessibilityObject
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (8)
74
if (toolStrip.
Items
.Count == 0)
79
StringBuilder itemNames = new(toolStrip.
Items
.Count);
81
for (int i = 0; i < toolStrip.
Items
.Count; i++)
83
itemNames.Append(toolStrip.
Items
[i].Name ?? "null");
192
for (int i = 0; ((i < toolStrip.
Items
.Count) && (i < keys.Length)); i++)
200
toolStrip.
Items
.Insert(i, value.
Items
[key]!);
219
foreach (ToolStripItem item in toolStrip.
Items
)
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.ToolStripSplitButtonExAccessibleObject.cs (3)
81
NavigateDirection.NavigateDirection_FirstChild => DropDownItemsCount > 0 ? _owningToolStripSplitButton.DropDown.
Items
[0].AccessibilityObject : null,
82
NavigateDirection.NavigateDirection_LastChild => DropDownItemsCount > 0 ? _owningToolStripSplitButton.DropDown.
Items
[_owningToolStripSplitButton.DropDown.
Items
.Count - 1].AccessibilityObject : null,
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (11)
74
ToolStripItem item = _owner.
Items
[toolStripItemIndex];
116
if (_owner.
Items
.IndexOf(droppedItem) < insertIndex)
121
_owner.
Items
.MoveItem(Math.Max(0, insertIndex), droppedItem);
124
else if (toolStripItemIndex == -1 && _owner.
Items
.Count == 0)
126
_owner.
Items
.Add(droppedItem);
136
ToolStripItem item = _owner.
Items
[i];
159
else if (_owner.
Items
.Count == 0)
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\Controls\ToolStrips\ToolStripSplitStackLayout.cs (16)
67
for (ForwardsWalkingIndex = 0; ForwardsWalkingIndex < toolStrip.
Items
.Count; ForwardsWalkingIndex++)
69
ToolStripItem item = toolStrip.
Items
[ForwardsWalkingIndex];
117
for (ForwardsWalkingIndex = 0; ForwardsWalkingIndex < ToolStrip.
Items
.Count; ForwardsWalkingIndex++)
119
ToolStripItem item = toolStrip.
Items
[ForwardsWalkingIndex];
239
for (int j = -1; j < toolStrip.
Items
.Count; j++)
261
item = toolStrip.
Items
[j];
381
for (int j = -1; j < ToolStrip.
Items
.Count; j++)
404
item = toolStrip.
Items
[j];
523
for (int i = 0; i < toolStrip.
Items
.Count; i++)
525
ToolStripItem item = toolStrip.
Items
[i];
547
for (int i = 0; i < toolStrip.
Items
.Count; i++)
549
if (toolStrip.
Items
[i].Placement == ToolStripItemPlacement.Overflow)
551
toolStrip.
Items
[i].ParentInternal = null;
554
toolStrip.
Items
[i].SetPlacement(ToolStripItemPlacement.None);
567
BackwardsWalkingIndex = (backIndex == -1) ? ToolStrip.
Items
.Count - 1 : backIndex - 1;
570
ToolStripItem item = ToolStrip.
Items
[BackwardsWalkingIndex];
System\Windows\Forms\DataBinding\BindingNavigator.cs (1)
219
Items
.AddRange(
System\Windows\Forms\MDI\MDIControlStrip.cs (4)
45
Items
.AddRange(_minimize, _restore, _close, _system);
48
foreach (ToolStripItem item in
Items
)
97
Debug.Assert(
Items
.Count <= 4, "Too many items in the MDIControlStrip. How did we get into this situation?");
126
_system.DropDown.
Items
.Clear();
System\Windows\Forms\MDI\MdiWindowListStrip.cs (1)
40
Items
.Add(_mergeItem);
System\Windows\Forms\Printing\PrintPreviewDialog.cs (3)
786
_toolStrip1.
Items
.AddRange(
962
_toolStrip1.
Items
.Add(_pageCounterItem);
963
_toolStrip1.
Items
.Add(_pageToolStripLabel);
System.Windows.Forms.Design (162)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (1)
72
addDownMenu.
Items
.Add(new TypeMenuItem(newItemTypes[i], addDownMenuClick));
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (2)
144
Items
.Remove(_panel);
158
Items
.Add(_panel);
System\Windows\Forms\Design\BaseContextMenuStrip.cs (4)
74
index =
Items
.IndexOf(_selectionMenuItem);
76
Items
.Remove(_selectionMenuItem);
145
Items
.Insert(index, _selectionMenuItem);
242
foreach (ToolStripItem item in
Items
)
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (1)
61
SiteItems(host: host, items: navigator.
Items
); // Recursively site and name all the items on the strip
System\Windows\Forms\Design\GroupedContextMenuStrip.cs (5)
47
Items
.Clear();
54
if (
Items
.Count > 0 && items.Count > 0)
56
Items
.Add(new ToolStripSeparator());
61
Items
.Add(item);
80
e.Cancel = (
Items
.Count == 0);
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
208
tool.
Items
.Add(rootItem);
345
tool.
Items
.Add(item);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (15)
355
menu.
Items
.AddRange((ToolStripItem[])[add, insert, delete, separator, label, absolute, percent, autosize]);
1578
menu.
Items
["add"].Enabled = enabled;
1579
menu.
Items
["insert"].Enabled = enabled;
1580
menu.
Items
["delete"].Enabled = enabled;
1581
menu.
Items
["sizemode"].Enabled = enabled;
1582
menu.
Items
["absolute"].Enabled = enabled;
1583
menu.
Items
["percent"].Enabled = enabled;
1584
menu.
Items
["autosize"].Enabled = enabled;
1588
((ToolStripMenuItem)menu.
Items
["absolute"]).Checked = false;
1589
((ToolStripMenuItem)menu.
Items
["percent"]).Checked = false;
1590
((ToolStripMenuItem)menu.
Items
["autosize"]).Checked = false;
1596
((ToolStripMenuItem)menu.
Items
["absolute"]).Checked = true;
1599
((ToolStripMenuItem)menu.
Items
["percent"]).Checked = true;
1602
((ToolStripMenuItem)menu.
Items
["autosize"]).Checked = true;
1612
menu.
Items
["delete"].Enabled = false;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (2)
68
int dummyIndex = parent.
Items
.IndexOf(_currentItem);
111
parent.
Items
.Insert(dummyIndex, (ToolStripItem)component);
System\Windows\Forms\Design\ToolStripCodeDomSerializer.cs (2)
18
if (toolStrip.
Items
.Count == 0)
23
foreach (ToolStripItem item in toolStrip.
Items
)
System\Windows\Forms\Design\ToolStripCollectionEditor.ToolStripItemEditorForm.cs (1)
397
ownerToolStrip?.
Items
.Add(newItem);
System\Windows\Forms\Design\ToolStripDesigner.cs (30)
148
foreach (ToolStripItem item in ToolStrip.
Items
)
433
foreach (ToolStripItem item in ToolStrip.
Items
)
689
ToolStrip.
Items
.Add(_editorNode);
875
int count = ToolStrip.
Items
.Count;
885
int indexToInsert = ToolStrip.
Items
.IndexOf(selectedItem);
886
ToolStrip.
Items
.Insert(indexToInsert, newItem);
892
ToolStrip.
Items
.Insert(count - 1, newItem);
896
ToolStrip.
Items
.Add(newItem);
1006
int itemIndex = ToolStrip.
Items
.IndexOf(item);
1012
ToolStrip.
Items
.Remove(item);
1023
if (ToolStrip.
Items
.Count > 1)
1025
itemIndex = Math.Min(ToolStrip.
Items
.Count - 1, itemIndex);
1051
IComponent targetSelection = (itemIndex == -1) ? ToolStrip : ToolStrip.
Items
[itemIndex];
1257
if (ToolStrip.
Items
.Count > 0)
1259
ToolStripItem[] items = new ToolStripItem[ToolStrip.
Items
.Count];
1260
ToolStrip.
Items
.CopyTo(items, 0);
1278
foreach (ToolStripItem item in ToolStrip.
Items
)
1830
if (offset.X >= parentToolStrip.
Items
[0].Bounds.X)
1835
else if (offset.X <= parentToolStrip.
Items
[0].Bounds.X)
1842
if (offset.Y <= parentToolStrip.
Items
[0].Bounds.Y)
1916
parentToolStrip.
Items
.Insert(0, components[i] as ToolStripItem);
1920
parentToolStrip.
Items
.Add(components[i] as ToolStripItem);
1971
int currentIndexOfEditor = ToolStrip.
Items
.IndexOf(_editorNode);
1972
if (currentIndexOfEditor == -1 || currentIndexOfEditor != ToolStrip.
Items
.Count - 1)
1977
ToolStrip.
Items
.Add(_editorNode);
2065
foreach (ToolStripItem item in ToolStrip.
Items
)
2140
if (_editorNode is not null && (ToolStrip.
Items
.IndexOf(_editorNode) == -1))
2142
ToolStrip.
Items
.Add(_editorNode);
2244
foreach (ToolStripItem item in ToolStrip.
Items
)
2461
foreach (ToolStripItem item in ToolStrip.
Items
)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (8)
80
get => ((ToolStrip)Component).
Items
;
388
_designMenu.
Items
.Add(_menuItem);
617
int count = _dropDown.
Items
.Count - 1;
620
ShowMenu(_dropDown.
Items
[count]);
658
if (_dropDown.
Items
.Count > 0)
660
ToolStripItem[] items = new ToolStripItem[_dropDown.
Items
.Count];
661
_dropDown.
Items
.CopyTo(items, 0);
666
_dropDown.
Items
.Remove(toolItem);
System\Windows\Forms\Design\ToolStripItemBehavior.cs (10)
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));
420
totalObjects[j++] = parent.
Items
[i];
727
int indexOfItemUnderMouseToDrop = parentToolStrip.
Items
.IndexOf(ToolStripDesigner.s_dragItem);
733
indexOfPrimarySelection = parentToolStrip.
Items
.IndexOf(selectedItem);
743
parentToolStrip.
Items
.Insert(indexOfItemUnderMouseToDrop, item);
975
parentDesigner.IndexOfItemUnderMouseToDrag = parentToolStrip.
Items
.IndexOf(glyphItem);
998
ownerItemDesigner._indexOfItemUnderMouseToDrag = parentDropDown.
Items
.IndexOf(glyphItem);
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (8)
374
int dummyIndex = parent.
Items
.IndexOf(_currentItem);
397
parent.
Items
.Insert(dummyIndex, (ToolStripItem)component);
436
int dummyIndex = parent.
Items
.IndexOf(_currentItem);
449
parent.
Items
.Insert(dummyIndex, (ToolStripItem)component);
475
int dummyIndex = parent.
Items
.IndexOf(_currentItem);
488
parent.
Items
.Insert(dummyIndex, (ToolStripItem)component);
515
int dummyIndex = parent.
Items
.IndexOf(_currentItem);
545
parent.
Items
.Insert(dummyIndex, (ToolStripItem)component);
System\Windows\Forms\Design\ToolStripItemDesigner.cs (8)
712
int dummyIndex = parent.
Items
.IndexOf(ToolStripItem);
774
parent.
Items
.Remove(ToolStripItem);
819
parent.
Items
.Insert(dummyIndex, newItem);
865
parent.
Items
.Insert(dummyIndex, ToolStripItem);
931
focusIndex = owner.
Items
.IndexOf(currentSelection);
1047
parent.
Items
.Remove(ToolStripItem);
1102
int currentIndex = parent.
Items
.IndexOf(ToolStripItem);
1103
ToolStripItem nextItem = parent.
Items
[currentIndex + 1];
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (25)
177
focusIndex = owner.
Items
.IndexOf(curDesignerNode);
680
int count = parent.
Items
.Count;
688
int endIndexOfSelection = Math.Max(0, parent.
Items
.IndexOf(item));
695
totalObjects[j++] = parent.
Items
[i];
702
SetSelection(parent.
Items
[0]);
725
int count = parent.
Items
.Count;
732
int startIndexOfSelection = parent.
Items
.IndexOf(item);
740
totalObjects[j++] = parent.
Items
[i];
747
SetSelection(parent.
Items
[count - 2]);
1394
if (parentToMoveOn.
Items
.IndexOf(newSelection) != -1
1395
&& parentToMoveOn.
Items
.IndexOf(newSelection) <= parentToMoveOn.
Items
.IndexOf(item))
1437
if (parentToMoveOn.
Items
.IndexOf(newSelection) != -1
1438
&& parentToMoveOn.
Items
.IndexOf(newSelection) >= parentToMoveOn.
Items
.IndexOf(item))
1805
ToolStripItemCollection collection = wb.
Items
;
1808
targetSelection = !backwards ? collection[0] : (object)collection[wb.
Items
.Count - 1];
1860
else if (item == parent.
Items
[0] && parent.RightToLeft != RightToLeft.Yes)
1910
else if (item == parent.
Items
[0] && parent.RightToLeft == RightToLeft.Yes)
1948
ToolStripItemCollection collection = parent.
Items
;
1953
ToolStripItemCollection collection = parent.
Items
;
2004
object[] totalObjects = new object[parent.
Items
.Count - 1];
2005
for (int i = 0; i < parent.
Items
.Count - 1; i++)
2007
if (parent.
Items
[i] is DesignerToolStripControlHost)
2012
totalObjects[i] = parent.
Items
[i];
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (27)
361
foreach (ToolStripItem currentItem in dropDown.
Items
)
371
dropDown.
Items
.Remove(_typeHereNode);
381
dropDown.
Items
.Add(_typeHereNode);
445
MenuItem.DropDown.
Items
.Remove(_commitedEditorNode);
629
MenuItem.DropDown.
Items
.Remove(_commitedEditorNode);
720
MenuItem.DropDown.
Items
.Add(_typeHereNode);
1354
for (int i = 0; i < wb.
Items
.Count; i++)
1356
Rectangle bounds = wb.
Items
[i].Bounds;
1357
bounds.Inflate(wb.
Items
[i].Margin.Size);
1360
return wb.
Items
.IndexOf(wb.
Items
[i]);
1667
MenuItem.DropDown.
Items
.Insert(_indexToInsertNewItem, newItem);
1685
MenuItem.DropDown.
Items
.Insert(index + 1, newItem);
1696
MenuItem.DropDown.
Items
.Insert(index, newItem);
1713
MenuItem.DropDown.
Items
.Insert(count - 1, newItem);
1725
MenuItem.DropDown.
Items
.Add(newItem);
1991
int currentIndexOfEditor = MenuItem.DropDown.
Items
.IndexOf(_typeHereNode);
1992
if (currentIndexOfEditor >= 0 && currentIndexOfEditor < MenuItem.DropDown.
Items
.Count - 1)
1997
MenuItem.DropDown.
Items
.Remove(_typeHereNode);
1998
MenuItem.DropDown.
Items
.Add(_typeHereNode);
2305
MenuItem.DropDown.
Items
.Remove(_commitedEditorNode);
2486
int maxIndex = Math.Max(ownerDropDown.
Items
.IndexOf(oldSelection), ownerDropDown.
Items
.IndexOf(MenuItem));
2487
int minIndex = Math.Min(ownerDropDown.
Items
.IndexOf(oldSelection), ownerDropDown.
Items
.IndexOf(MenuItem));
2492
selectedItems[i] = ownerDropDown.
Items
[minIndex];
2701
parentToolStrip.
Items
.Add(toolItem);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (11)
859
int index = _miniToolStrip.
Items
.IndexOf(_centerLabel);
863
_miniToolStrip.
Items
.Insert(index, _centerTextBox);
864
_miniToolStrip.
Items
.Remove(_centerLabel);
902
int index = _miniToolStrip.
Items
.IndexOf(_centerTextBox);
908
_miniToolStrip.
Items
.Insert(index, _centerLabel);
909
_miniToolStrip.
Items
.Remove(_centerTextBox);
1343
_miniToolStrip.
Items
.AddRange((ToolStripItem[])[_centerLabel]);
1409
_miniToolStrip.
Items
.AddRange((ToolStripItem[])
1619
for (int i = 0; i <
Items
.Count; i++)
1621
if (
Items
[i].Selected)
1623
selectedItem =
Items
[i];