1 override of Items
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
34
public override ToolStripItemCollection
Items
987 references to Items
Accessibility_Core_App (12)
DataControls.Designer.cs (1)
77
this.bindingNavigator1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
Menu_Toolbars_controls.Designer.cs (4)
110
menuStrip1.
Items
.AddRange(new ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, toolsToolStripMenuItem, helpToolStripMenuItem, toolStripMenuItem1, toolStripComboBox1, toolStripTextBox1 });
123
contextMenuStrip1.
Items
.AddRange(new ToolStripItem[] { menuStripToolStripMenuItem, shortCutsToolStripMenuItem });
421
statusStrip1.
Items
.AddRange(new ToolStripItem[] { toolStripDropDownButton1, toolStripSplitButton1, toolStripStatusLabel1, toolStripProgressBar1 });
504
toolStrip1.
Items
.AddRange(new ToolStripItem[] { newToolStripButton, toolStripSeparator7, toolStripButton1, toolStripButton2, toolStripButton3, toolStripButton4, toolStripButton5, toolStripButton6 });
PrintingControls.cs (2)
61
((ToolStripButton)((ToolStrip)printPreviewDialog1.Controls[1]).
Items
[0]).Enabled = false;// disable the direct print from printpreview.as when we click that Print button PrintPage event fires again.
62
foreach (ToolStripItem item in ((ToolStrip)printPreviewDialog1.Controls[1]).
Items
)
RemainingControls.cs (2)
13
foreach (ToolStripItem item in ((ToolStrip)propertyGrid1.Controls[3]).
Items
)
23
foreach (ToolStripItem item in ((ToolStrip)propertyGrid2.Controls[3]).
Items
)
ToolStripContainer.Designer.cs (3)
122
this.toolStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
274
this.statusStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
332
this.menuStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
DesignSurface (5)
MainForm.cs (4)
307
menuStrip1.
Items
.Add(toolStripMenuItem1);
308
menuStrip1.
Items
.Add(toolStripMenuItem2);
309
menuStrip2.
Items
.Add(menu1);
310
menuStrip2.
Items
.Add(menuNew1);
MainForm.Designer.cs (1)
163
this.menuStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
System.Windows.Forms (184)
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\ToolStrips\StatusStrip.cs (2)
381
for (int i = 0; i <
Items
.Count; i++)
383
ToolStripItem item =
Items
[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (43)
22
[DefaultProperty(nameof(
Items
))]
160
Items
.AddRange(items);
875
foreach (ToolStripItem item in
Items
)
935
LayoutTransaction.DoLayoutIf((
Items
.Count > 0), this, this, PropertyNames.ImageScalingSize);
936
foreach (ToolStripItem item in
Items
)
977
foreach (ToolStripItem item in
Items
)
1626
foreach (ToolStripItem item in
Items
)
1712
for (int i = 0; i <
Items
.Count; i++)
1714
Items
[i].OnOwnerTextDirectionChanged();
1911
if (!
Items
.IsReadOnly)
1914
for (int i =
Items
.Count - 1; i >= 0; i--)
1916
Items
[i].Dispose();
1919
Items
.Clear();
2281
for (int j = 0; j < toolStrip.
Items
.Count; j++)
2283
ToolStripItem item = toolStrip.
Items
[j];
2302
if (toolStrip.
Items
.Count == 0 || (!foundItemParticipatingInLayout))
2340
for (int j = 0; j < toolStrip.
Items
.Count; j++)
2342
ToolStripItem item = toolStrip.
Items
[j];
2361
if (toolStrip.
Items
.Count == 0 || !foundItemParticipatingInLayout)
2522
for (int i = 0; i <
Items
.Count; i++)
2524
renderer.InitializeItem(
Items
[i]);
2701
foreach (ToolStripItem item in
Items
)
3144
for (int i = 0; i <
Items
.Count; i++)
3146
if (
Items
[i] is not null &&
Items
[i].ParentInternal == this)
3148
Items
[i].OnParentEnabledChanged(e);
3171
for (int i = 0; i <
Items
.Count; i++)
3173
Items
[i].OnOwnerFontChanged(e);
3264
for (int j = 0; j <
Items
.Count; j++)
3266
Items
[j].OnLayout(e);
3617
for (int i = 0; i <
Items
.Count; i++)
3619
Items
[i].OnParentRightToLeftChanged(e);
3746
foreach (ToolStripItem item in
Items
)
3922
ReleaseToolStripItemsProviders(
Items
);
4049
foreach (ToolStripItem item in
Items
)
4268
for (; j >= 0 && j <
Items
.Count; j = (pass == 0) ? j + 1 : j - 1)
4270
ToolStripItem item =
Items
[j];
4334
for (int j = 0; j <
Items
.Count; j++)
4336
ToolStripItem item =
Items
[j];
4479
return $"{base.ToString()}, Name: {Name}, Items: {
Items
.Count}";
4657
get { return
Items
; }
4710
int i =
Items
.Count;
4713
ToolStripItem item =
Items
[i];
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (25)
43
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
57
if (index < owner.
Items
.Count)
63
for (int i = 0; i < owner.
Items
.Count; ++i)
65
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Left)
69
item = owner.
Items
[i];
80
for (int i = 0; i < owner.
Items
.Count; ++i)
82
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Right)
86
item = owner.
Items
[i];
109
if (owner.CanOverflow && owner.OverflowButton.Visible && index == owner.
Items
.Count)
123
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
129
for (int i = 0; i < owner.
Items
.Count; i++)
131
if (owner.
Items
[i].Available)
281
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
326
if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.
Items
is null)
344
return owner.
Items
.Count + index;
348
for (int i = 0; i < owner.
Items
.Count; ++i)
350
if (owner.
Items
[i].Available && owner.
Items
[i].Alignment == ToolStripItemAlignment.Left)
352
if (child.Owner == owner.
Items
[i])
362
for (int i = 0; i < owner.
Items
.Count; ++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\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];
479
int index =
Items
.IndexOf(nextItem);
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;
621
if (
Items
.Count > 0)
623
int delta =
Items
[0].Bounds.Top - DisplayRectangle.Top;
644
if (!RequiresScrollButtons ||
Items
.Count == 0)
656
int alreadyScrolled = displayRectangle.Top -
Items
[0].Bounds.Top;
663
for (int i = 0; i <
Items
.Count && deltaToScroll < requiredScrollAmount; ++i)
665
if (
Items
[i].Available)
667
Rectangle adjustedLastItemBounds =
Items
[
Items
.Count - 1].Bounds;
677
if (i <
Items
.Count - 1)
679
deltaToScroll +=
Items
[i + 1].Bounds.Top -
Items
[i].Bounds.Top;
683
deltaToScroll +=
Items
[i].Bounds.Height;
690
for (int i =
Items
.Count - 1; i >= 0 && deltaToScroll > requiredScrollAmount; --i)
692
if (
Items
[i].Available)
694
Rectangle adjustedLastItemBounds =
Items
[0].Bounds;
706
deltaToScroll -=
Items
[i].Bounds.Top -
Items
[i - 1].Bounds.Top;
710
deltaToScroll -=
Items
[i].Bounds.Height;
717
_scrollAmount = DisplayRectangle.Top -
Items
[0].Bounds.Top;
734
if (_indexOfFirstDisplayedItem == -1 || _indexOfFirstDisplayedItem >=
Items
.Count)
752
ToolStripItem itemTop =
Items
[_indexOfFirstDisplayedItem - 1];
753
ToolStripItem itemBottom =
Items
[_indexOfFirstDisplayedItem];
760
if (_indexOfFirstDisplayedItem ==
Items
.Count - 1)
766
ToolStripItem itemTop =
Items
[_indexOfFirstDisplayedItem];
767
ToolStripItem itemBottom =
Items
[_indexOfFirstDisplayedItem + 1];
821
for (int i = 0; i <
Items
.Count; ++i)
823
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)
1412
_owner?.
Items
.Remove(this);
1414
value?.
Items
.Add(this);
2065
if (ParentInternal is not null && ParentInternal.
Items
.Contains(this) && ParentInternal.AllowItemReorder)
2102
Debug.Assert(Owner.
Items
.Contains(this), "How can there be a owner and not be in the collection?");
2103
Owner.
Items
.Remove(this);
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (5)
468
int indexOfItem = value.ParentInternal.
Items
.IndexOf(value);
471
value.ParentInternal.
Items
.RemoveAt(indexOfItem);
489
int indexOfItem = value.ParentInternal.
Items
.IndexOf(value);
493
value.ParentInternal.
Items
.RemoveAt(indexOfItem);
511
item.Owner?.
Items
.Remove(item);
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (9)
200
foreach (ToolStripItem item in toolStrip.
Items
)
1107
int originalCount = sourceToolStrip.
Items
.Count;
1120
ToolStripItem item = sourceToolStrip.
Items
[itemToLookAt];
1121
MergeRecursive(item, targetToolStrip.
Items
, mergeHistory.MergeHistoryItemsStack);
1123
int numberOfItemsMerged = lastCount - sourceToolStrip.
Items
.Count;
1125
lastCount = sourceToolStrip.
Items
.Count;
1206
PreviousIndexCollection = source.Owner!.
Items
1226
PreviousIndexCollection = source.Owner!.
Items
1241
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 (161)
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)
209
tool.
Items
.Add(rootItem);
353
tool.
Items
.Add(item);
System\Windows\Forms\Design\TableLayoutPanelDesigner.cs (15)
355
menu.
Items
.AddRange((ToolStripItem[])[add, insert, delete, separator, label, absolute, percent, autosize]);
1593
menu.
Items
["add"].Enabled = enabled;
1594
menu.
Items
["insert"].Enabled = enabled;
1595
menu.
Items
["delete"].Enabled = enabled;
1596
menu.
Items
["sizemode"].Enabled = enabled;
1597
menu.
Items
["absolute"].Enabled = enabled;
1598
menu.
Items
["percent"].Enabled = enabled;
1599
menu.
Items
["autosize"].Enabled = enabled;
1603
((ToolStripMenuItem)menu.
Items
["absolute"]).Checked = false;
1604
((ToolStripMenuItem)menu.
Items
["percent"]).Checked = false;
1605
((ToolStripMenuItem)menu.
Items
["autosize"]).Checked = false;
1611
((ToolStripMenuItem)menu.
Items
["absolute"]).Checked = true;
1614
((ToolStripMenuItem)menu.
Items
["percent"]).Checked = true;
1617
((ToolStripMenuItem)menu.
Items
["autosize"]).Checked = true;
1627
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\ToolStripDesigner.cs (30)
147
foreach (ToolStripItem item in ToolStrip.
Items
)
466
foreach (ToolStripItem item in ToolStrip.
Items
)
734
ToolStrip.
Items
.Add(_editorNode);
905
int count = ToolStrip.
Items
.Count;
915
int indexToInsert = ToolStrip.
Items
.IndexOf(selectedItem);
916
ToolStrip.
Items
.Insert(indexToInsert, newItem);
922
ToolStrip.
Items
.Insert(count - 1, newItem);
926
ToolStrip.
Items
.Add(newItem);
1036
int itemIndex = ToolStrip.
Items
.IndexOf(item);
1042
ToolStrip.
Items
.Remove(item);
1056
if (ToolStrip.
Items
.Count > 1)
1058
itemIndex = Math.Min(ToolStrip.
Items
.Count - 1, itemIndex);
1084
IComponent targetSelection = (itemIndex == -1) ? ToolStrip : ToolStrip.
Items
[itemIndex];
1275
if (ToolStrip.
Items
.Count > 0)
1277
ToolStripItem[] items = new ToolStripItem[ToolStrip.
Items
.Count];
1278
ToolStrip.
Items
.CopyTo(items, 0);
1296
foreach (ToolStripItem item in ToolStrip.
Items
)
1809
if (offset.X >= parentToolStrip.
Items
[0].Bounds.X)
1814
else if (offset.X <= parentToolStrip.
Items
[0].Bounds.X)
1821
if (offset.Y <= parentToolStrip.
Items
[0].Bounds.Y)
1901
parentToolStrip.
Items
.Insert(0, components[i] as ToolStripItem);
1905
parentToolStrip.
Items
.Add(components[i] as ToolStripItem);
1959
int currentIndexOfEditor = ToolStrip.
Items
.IndexOf(_editorNode);
1960
if (currentIndexOfEditor == -1 || currentIndexOfEditor != ToolStrip.
Items
.Count - 1)
1964
ToolStrip.
Items
.Add(_editorNode);
2050
foreach (ToolStripItem item in ToolStrip.
Items
)
2125
if (_editorNode is not null && (ToolStrip.
Items
.IndexOf(_editorNode) == -1))
2127
ToolStrip.
Items
.Add(_editorNode);
2229
foreach (ToolStripItem item in ToolStrip.
Items
)
2463
foreach (ToolStripItem item in ToolStrip.
Items
)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (8)
80
get => ((ToolStrip)Component).
Items
;
397
_designMenu.
Items
.Add(_menuItem);
626
int count = _dropDown.
Items
.Count - 1;
629
ShowMenu(_dropDown.
Items
[count]);
667
if (_dropDown.
Items
.Count > 0)
669
ToolStripItem[] items = new ToolStripItem[_dropDown.
Items
.Count];
670
_dropDown.
Items
.CopyTo(items, 0);
675
_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];
736
int indexOfItemUnderMouseToDrop = parentToolStrip.
Items
.IndexOf(ToolStripDesigner.s_dragItem);
742
indexOfPrimarySelection = parentToolStrip.
Items
.IndexOf(selectedItem);
752
parentToolStrip.
Items
.Insert(indexOfItemUnderMouseToDrop, item);
987
parentDesigner.IndexOfItemUnderMouseToDrag = parentToolStrip.
Items
.IndexOf(glyphItem);
1010
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)
733
int dummyIndex = parent.
Items
.IndexOf(ToolStripItem);
795
parent.
Items
.Remove(ToolStripItem);
840
parent.
Items
.Insert(dummyIndex, newItem);
886
parent.
Items
.Insert(dummyIndex, ToolStripItem);
955
focusIndex = owner.
Items
.IndexOf(currentSelection);
1071
parent.
Items
.Remove(ToolStripItem);
1126
int currentIndex = parent.
Items
.IndexOf(ToolStripItem);
1127
ToolStripItem nextItem = parent.
Items
[currentIndex + 1];
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (25)
180
focusIndex = owner.
Items
.IndexOf(curDesignerNode);
683
int count = parent.
Items
.Count;
691
int endIndexOfSelection = Math.Max(0, parent.
Items
.IndexOf(item));
698
totalObjects[j++] = parent.
Items
[i];
705
SetSelection(parent.
Items
[0]);
728
int count = parent.
Items
.Count;
735
int startIndexOfSelection = parent.
Items
.IndexOf(item);
743
totalObjects[j++] = parent.
Items
[i];
750
SetSelection(parent.
Items
[count - 2]);
1406
if (parentToMoveOn.
Items
.IndexOf(newSelection) != -1
1407
&& parentToMoveOn.
Items
.IndexOf(newSelection) <= parentToMoveOn.
Items
.IndexOf(item))
1449
if (parentToMoveOn.
Items
.IndexOf(newSelection) != -1
1450
&& parentToMoveOn.
Items
.IndexOf(newSelection) >= parentToMoveOn.
Items
.IndexOf(item))
1826
ToolStripItemCollection collection = wb.
Items
;
1829
targetSelection = !backwards ? collection[0] : (object)collection[wb.
Items
.Count - 1];
1881
else if (item == parent.
Items
[0] && parent.RightToLeft != RightToLeft.Yes)
1931
else if (item == parent.
Items
[0] && parent.RightToLeft == RightToLeft.Yes)
1969
ToolStripItemCollection collection = parent.
Items
;
1974
ToolStripItemCollection collection = parent.
Items
;
2025
object[] totalObjects = new object[parent.
Items
.Count - 1];
2026
for (int i = 0; i < parent.
Items
.Count - 1; i++)
2028
if (parent.
Items
[i] is DesignerToolStripControlHost)
2033
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);
638
MenuItem.DropDown.
Items
.Remove(_commitedEditorNode);
735
MenuItem.DropDown.
Items
.Add(_typeHereNode);
1387
for (int i = 0; i < wb.
Items
.Count; i++)
1389
Rectangle bounds = wb.
Items
[i].Bounds;
1390
bounds.Inflate(wb.
Items
[i].Margin.Size);
1393
return wb.
Items
.IndexOf(wb.
Items
[i]);
1700
MenuItem.DropDown.
Items
.Insert(_indexToInsertNewItem, newItem);
1718
MenuItem.DropDown.
Items
.Insert(index + 1, newItem);
1729
MenuItem.DropDown.
Items
.Insert(index, newItem);
1746
MenuItem.DropDown.
Items
.Insert(count - 1, newItem);
1758
MenuItem.DropDown.
Items
.Add(newItem);
2033
int currentIndexOfEditor = MenuItem.DropDown.
Items
.IndexOf(_typeHereNode);
2034
if (currentIndexOfEditor >= 0 && currentIndexOfEditor < MenuItem.DropDown.
Items
.Count - 1)
2039
MenuItem.DropDown.
Items
.Remove(_typeHereNode);
2040
MenuItem.DropDown.
Items
.Add(_typeHereNode);
2353
MenuItem.DropDown.
Items
.Remove(_commitedEditorNode);
2537
int maxIndex = Math.Max(ownerDropDown.
Items
.IndexOf(oldSelection), ownerDropDown.
Items
.IndexOf(MenuItem));
2538
int minIndex = Math.Min(ownerDropDown.
Items
.IndexOf(oldSelection), ownerDropDown.
Items
.IndexOf(MenuItem));
2543
selectedItems[i] = ownerDropDown.
Items
[minIndex];
2758
parentToolStrip.
Items
.Add(toolItem);
System\Windows\Forms\Design\ToolStripTemplateNode.cs (11)
901
int index = _miniToolStrip.
Items
.IndexOf(_centerLabel);
905
_miniToolStrip.
Items
.Insert(index, _centerTextBox);
906
_miniToolStrip.
Items
.Remove(_centerLabel);
944
int index = _miniToolStrip.
Items
.IndexOf(_centerTextBox);
950
_miniToolStrip.
Items
.Insert(index, _centerLabel);
951
_miniToolStrip.
Items
.Remove(_centerTextBox);
1391
_miniToolStrip.
Items
.AddRange((ToolStripItem[])[_centerLabel]);
1457
_miniToolStrip.
Items
.AddRange((ToolStripItem[])
1667
for (int i = 0; i <
Items
.Count; i++)
1669
if (
Items
[i].Selected)
1671
selectedItem =
Items
[i];
System.Windows.Forms.Design.Tests (10)
System\Windows\Forms\Design\BaseContextMenuStripTests.cs (2)
24
contextMenuStrip.
Items
.Add(new ToolStripMenuItem());
30
foreach (var item in contextMenuStrip.
Items
.OfType<ToolStripMenuItem>())
System\Windows\Forms\Design\GroupedContextMenuStripTests.cs (4)
15
groupedContextMenuStrip.
Items
.Count.Should().Be(0);
28
groupedContextMenuStrip.
Items
.Count.Should().Be(1);
44
groupedContextMenuStrip.
Items
.Count.Should().Be(3);
45
groupedContextMenuStrip.
Items
[1].Should().BeOfType<ToolStripSeparator>();
ToolStripDesignerTests.cs (2)
44
toolStrip.
Items
.Add("123");
45
toolStrip.
Items
.Add("abc");
ToolStripDropDownDesignerTest.cs (2)
39
toolStripDropDown.
Items
.Add("123");
40
toolStripDropDown.
Items
.Add("456");
System.Windows.Forms.Tests (583)
BindingNavigatorTests.cs (26)
113
Assert.Equal(11, bn.
Items
.Count);
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++]);
199
navigator.
Items
[0].Name.Should().Be("bindingNavigatorMoveFirstItem");
200
navigator.
Items
[1].Name.Should().Be("bindingNavigatorMovePreviousItem");
201
navigator.
Items
[2].Name.Should().Be("bindingNavigatorSeparator1");
202
navigator.
Items
[3].Name.Should().Be("bindingNavigatorPositionItem");
203
navigator.
Items
[4].Name.Should().Be("bindingNavigatorCountItem");
204
navigator.
Items
[5].Name.Should().Be("bindingNavigatorSeparator2");
205
navigator.
Items
[6].Name.Should().Be("bindingNavigatorMoveNextItem");
206
navigator.
Items
[7].Name.Should().Be("bindingNavigatorMoveLastItem");
207
navigator.
Items
[8].Name.Should().Be("bindingNavigatorSeparator3");
208
navigator.
Items
[9].Name.Should().Be("bindingNavigatorAddNewItem");
209
navigator.
Items
[10].Name.Should().Be("bindingNavigatorDeleteItem");
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (11)
1436
Assert.Throws<ArgumentException>(() => toolStrip.
Items
.Add(host));
1441
toolStrip.
Items
.Add(host);
1503
Assert.Throws<ArgumentException>(() => toolStrip.
Items
.Add(host));
1508
toolStrip.
Items
.Add(host);
1535
toolStrip.
Items
.Add(label);
1540
Assert.Throws<ArgumentException>(() => toolStrip.
Items
.Add(host));
1545
toolStrip.
Items
.Add(host);
1546
toolStrip.
Items
.Add(button);
1572
toolStrip.
Items
.Add(label);
1577
Assert.Throws<ArgumentException>(() => toolStrip.
Items
.Add(host));
1582
toolStrip.
Items
.Add(host);
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (59)
233
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
351
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
362
menuStrip.
Items
.Insert(0, CreateSkippedItem());
367
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
378
menuStrip.
Items
.Add(CreateSkippedItem());
379
menuStrip.
Items
.Add(CreateSkippedItem());
394
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
399
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
410
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
415
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
426
menuStrip.
Items
.Insert(0, CreateSkippedItem());
428
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
433
AccessibleObject expected = menuStrip.
Items
[2].AccessibilityObject;
444
menuStrip.
Items
.Insert(0, CreateSkippedItem());
446
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
451
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
462
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
463
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
468
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
479
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
480
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
485
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
542
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
576
menuStrip.
Items
.Add(CreateSkippedItem());
581
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
592
menuStrip.
Items
.Add(CreateSkippedItem());
593
menuStrip.
Items
.Add(CreateSkippedItem());
608
menuStrip.
Items
.Add(CreateSkippedItem());
609
menuStrip.
Items
.Add(CreateSkippedItem());
625
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
630
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
641
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
646
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
657
menuStrip.
Items
.Insert(0, CreateSkippedItem());
658
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
660
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
662
menuStrip.
Items
.Add(CreateSkippedItem());
663
menuStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
668
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
679
menuStrip.
Items
.Insert(0, CreateSkippedItem());
680
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
682
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
684
menuStrip.
Items
.Add(CreateSkippedItem());
685
menuStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
690
AccessibleObject expected = menuStrip.
Items
[2].AccessibilityObject;
701
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
702
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
707
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
718
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
719
menuStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
724
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
789
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
827
menuStrip.
Items
.Insert(1, CreateSkippedItem());
832
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
863
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
866
AccessibleObject expected = menuStrip.
Items
[0].AccessibilityObject;
888
menuStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
891
AccessibleObject expected = menuStrip.
Items
[1].AccessibilityObject;
936
menuStrip.
Items
.Add(CreateMenuItem());
System\Windows\Forms\AccessibleObjects\StatusStrip.StatusStripAccessibleObjectTests.cs (59)
213
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
331
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
342
statusStrip.
Items
.Insert(0, CreateSkippedItem());
347
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
358
statusStrip.
Items
.Add(CreateSkippedItem());
359
statusStrip.
Items
.Add(CreateSkippedItem());
374
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
379
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
390
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
395
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
406
statusStrip.
Items
.Insert(0, CreateSkippedItem());
408
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
413
AccessibleObject expected = statusStrip.
Items
[2].AccessibilityObject;
424
statusStrip.
Items
.Insert(0, CreateSkippedItem());
426
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
431
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
442
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
443
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
448
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
459
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
460
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
465
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
522
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
556
statusStrip.
Items
.Add(CreateSkippedItem());
561
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
572
statusStrip.
Items
.Add(CreateSkippedItem());
573
statusStrip.
Items
.Add(CreateSkippedItem());
588
statusStrip.
Items
.Add(CreateSkippedItem());
589
statusStrip.
Items
.Add(CreateSkippedItem());
605
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
610
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
621
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
626
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
637
statusStrip.
Items
.Insert(0, CreateSkippedItem());
638
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
640
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
642
statusStrip.
Items
.Add(CreateSkippedItem());
643
statusStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
648
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
659
statusStrip.
Items
.Insert(0, CreateSkippedItem());
660
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
662
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
664
statusStrip.
Items
.Add(CreateSkippedItem());
665
statusStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
670
AccessibleObject expected = statusStrip.
Items
[2].AccessibilityObject;
681
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
682
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
687
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
698
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
699
statusStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
704
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
769
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
807
statusStrip.
Items
.Insert(1, CreateSkippedItem());
812
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
843
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
846
AccessibleObject expected = statusStrip.
Items
[0].AccessibilityObject;
869
statusStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
872
AccessibleObject expected = statusStrip.
Items
[1].AccessibilityObject;
917
statusStrip.
Items
.Add(CreateStatusStripItem());
System\Windows\Forms\AccessibleObjects\ToolStripAccessibleObjectTests.cs (59)
226
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
344
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
355
toolStrip.
Items
.Insert(0, CreateSkippedItem());
360
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
371
toolStrip.
Items
.Add(CreateSkippedItem());
372
toolStrip.
Items
.Add(CreateSkippedItem());
387
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
392
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
403
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
408
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
419
toolStrip.
Items
.Insert(0, CreateSkippedItem());
421
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
426
AccessibleObject expected = toolStrip.
Items
[2].AccessibilityObject;
437
toolStrip.
Items
.Insert(0, CreateSkippedItem());
439
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
444
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
455
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
456
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
461
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
472
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
473
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
478
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
535
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
569
toolStrip.
Items
.Add(CreateSkippedItem());
574
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
585
toolStrip.
Items
.Add(CreateSkippedItem());
586
toolStrip.
Items
.Add(CreateSkippedItem());
601
toolStrip.
Items
.Add(CreateSkippedItem());
602
toolStrip.
Items
.Add(CreateSkippedItem());
618
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
623
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
634
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
639
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
650
toolStrip.
Items
.Insert(0, CreateSkippedItem());
651
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
653
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
655
toolStrip.
Items
.Add(CreateSkippedItem());
656
toolStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
661
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
672
toolStrip.
Items
.Insert(0, CreateSkippedItem());
673
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
675
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
677
toolStrip.
Items
.Add(CreateSkippedItem());
678
toolStrip.
Items
[3].Alignment = ToolStripItemAlignment.Right;
683
AccessibleObject expected = toolStrip.
Items
[2].AccessibilityObject;
694
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
695
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
700
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
711
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
712
toolStrip.
Items
[1].Alignment = ToolStripItemAlignment.Right;
717
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
782
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
820
toolStrip.
Items
.Insert(1, CreateSkippedItem());
825
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
856
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
859
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
881
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
884
AccessibleObject expected = toolStrip.
Items
[1].AccessibilityObject;
977
toolStrip.
Items
.Add(CreateToolStripItem());
System\Windows\Forms\AccessibleObjects\ToolStripComboBox.ToolStripComboBoxAccessibleObjectTests.cs (1)
13
toolStrip.
Items
.Add(toolStripComboBox);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripControlHostAccessibleObjectTests.cs (1)
72
toolStrip.
Items
.Add(toolStripControlHost);
System\Windows\Forms\AccessibleObjects\ToolStripControlHost.ToolStripHostedControlAccessibleObjectTests.cs (1)
24
toolStrip.
Items
.Add(item);
System\Windows\Forms\AccessibleObjects\ToolStripDropDownButton.ToolStripDropDownButtonAccessibleObjectTests.cs (2)
79
toolStrip.
Items
.Add(dropDownItem);
84
AccessibleObject accessibleObject = toolStrip.
Items
[0].AccessibilityObject;
System\Windows\Forms\AccessibleObjects\ToolStripDropDownItemAccessibleObjectTests.cs (6)
63
control.DropDown.
Items
.Add(new SubToolStripDropDownItem());
82
control.DropDown.
Items
.Add(new SubToolStripDropDownItem());
95
control.DropDown.
Items
.Add(new SubToolStripDropDownItem() { Available = true });
120
control.DropDown.
Items
.AddRange(new[] { item1, item2 });
138
control.DropDown.
Items
.AddRange(new[] { item1, item2 });
157
control.DropDown.
Items
.AddRange(new[] { item1, item2 });
System\Windows\Forms\AccessibleObjects\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObjectTests.cs (2)
34
toolStrip.
Items
.Add(item);
116
toolStrip.
Items
.Add(ownerItem);
System\Windows\Forms\AccessibleObjects\ToolStripItemAccessibleObjectTests.cs (26)
118
toolStrip.
Items
.Add(item);
204
toolStrip.
Items
.Add(string.Empty);
208
AccessibleObject accessibleObject = toolStrip.
Items
[0].AccessibilityObject;
218
toolStrip.
Items
.Add(string.Empty);
220
AccessibleObject accessibleObject = toolStrip.
Items
[0].AccessibilityObject;
230
toolStrip.
Items
.Add(string.Empty);
232
AccessibleObject accessibleObject = toolStrip.
Items
[0].AccessibilityObject;
244
toolStrip.
Items
.Add(string.Empty);
245
toolStrip.
Items
.Add(string.Empty);
250
AccessibleObject item1 = toolStrip.
Items
[0].AccessibilityObject;
251
AccessibleObject item2 = toolStrip.
Items
[1].AccessibilityObject;
269
toolStrip.
Items
.Add(string.Empty);
273
AccessibleObject accessibleObject = toolStrip.
Items
[0].AccessibilityObject;
285
toolStrip.
Items
.Add(string.Empty);
286
toolStrip.
Items
.Add(string.Empty);
288
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
293
AccessibleObject item1 = toolStrip.
Items
[0].AccessibilityObject;
294
AccessibleObject item2 = toolStrip.
Items
[1].AccessibilityObject;
317
toolStrip.
Items
.Add(CreateSkippedItem());
318
toolStrip.
Items
.Add(string.Empty);
319
toolStrip.
Items
.Add(CreateSkippedItem());
320
toolStrip.
Items
.Add(string.Empty);
321
toolStrip.
Items
.Add(CreateSkippedItem());
323
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
328
AccessibleObject item2 = toolStrip.
Items
[1].AccessibilityObject;
329
AccessibleObject item4 = toolStrip.
Items
[3].AccessibilityObject;
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (12)
133
menuStrip.
Items
.Add(item1);
136
Assert.Single(menuStrip.
Items
);
140
menuStrip.
Items
.Add(separator);
143
Assert.Equal(2, menuStrip.
Items
.Count);
148
menuStrip.
Items
.Add(item2);
151
Assert.Equal(3, menuStrip.
Items
.Count);
173
menuStrip.
Items
.Add(item1);
176
Assert.Single(menuStrip.
Items
);
180
menuStrip.
Items
.Add(separator);
183
Assert.Equal(2, menuStrip.
Items
.Count);
188
menuStrip.
Items
.Add(item2);
191
Assert.Equal(3, menuStrip.
Items
.Count);
System\Windows\Forms\AccessibleObjects\ToolStripOverflow.ToolStripOverflowAccessibleObjectTests.cs (7)
130
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
140
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
147
AccessibleObject expected = toolStrip.
Items
[0].AccessibilityObject;
160
AccessibleObject expected = toolStrip.
Items
[4].AccessibilityObject;
170
toolStrip.
Items
[0].Alignment = ToolStripItemAlignment.Right;
177
AccessibleObject expected = toolStrip.
Items
[4].AccessibilityObject;
207
toolStrip.
Items
.Add(CreateItem(ToolStripItemAlignment.Left));
System\Windows\Forms\AccessibleObjects\ToolStripOverflowButton.ToolStripOverflowButtonAccessibleObjectTests.cs (7)
84
toolStrip.
Items
.Add(string.Empty);
85
toolStrip.
Items
.Add(string.Empty);
86
toolStrip.
Items
.Add(string.Empty);
110
toolStrip.
Items
.Add(string.Empty);
111
toolStrip.
Items
.Add(string.Empty);
112
toolStrip.
Items
.Add(string.Empty);
117
AccessibleObject item1 = toolStrip.
Items
[0].AccessibilityObject;
System\Windows\Forms\AccessibleObjects\ToolStripProgressBar.ToolStripProgressBarControl.ToolStripProgressBarControlAccessibleObjectTests.cs (3)
126
toolStrip.
Items
.Add(label);
127
toolStrip.
Items
.Add(item);
128
toolStrip.
Items
.Add(button);
System\Windows\Forms\AccessibleObjects\ToolStripScrollButton.ToolStripScrollButtonAccessibleObjectTests.cs (8)
36
toolStrip.
Items
.Add(ownerItem);
56
AccessibleObject itemAccessibleObject1 = dropDownMenu.
Items
[0].AccessibilityObject;
57
AccessibleObject itemAccessibleObject2 = dropDownMenu.
Items
[1].AccessibilityObject;
58
AccessibleObject itemAccessibleObject3 = dropDownMenu.
Items
[2].AccessibilityObject;
98
toolStrip.
Items
.Add(ownerItem);
117
AccessibleObject itemAccessibleObject1 = dropDownMenu.
Items
[0].AccessibilityObject;
118
AccessibleObject itemAccessibleObject2 = dropDownMenu.
Items
[1].AccessibilityObject;
136
toolStrip.
Items
.Add(ownerItem);
System\Windows\Forms\AccessibleObjects\ToolStripSplitButton.ToolStripSplitButtonExAccessibleObjectTests.cs (2)
54
toolStrip.
Items
.Add(toolStripSplitButton);
70
toolStrip.
Items
.Add(toolStripSplitButton);
System\Windows\Forms\ControlTests.cs (8)
935
toolStrip1.
Items
.AddRange((ToolStripItem[])
945
toolStrip2.
Items
.AddRange((ToolStripItem[])
965
Assert.True(toolStrip2.
Items
[0].Selected);
970
Assert.True(toolStrip2.
Items
[0].Selected);
992
toolStrip1.
Items
.AddRange((ToolStripItem[])
1002
toolStrip2.
Items
.AddRange((ToolStripItem[])
1022
Assert.True(toolStrip1.
Items
[0].Selected);
1027
Assert.True(toolStrip1.
Items
[0].Selected);
System\Windows\Forms\FormTests.cs (2)
1254
Assert.False(menuStrip.
Items
[0].Visible);
1261
Assert.True(menuStrip.
Items
[0].Visible);
System\Windows\Forms\Layout\TableLayoutSettingsTests.cs (4)
1744
control.
Items
.Add(itemWithDefaultName);
1745
control.
Items
.Add(itemWithoutName);
1746
control.
Items
.Add(itemWithNonStringName);
1747
control.
Items
.Add(itemWithName);
System\Windows\Forms\Layout\TableLayoutSettingsTypeConverterTests.cs (1)
173
toolStrip.
Items
.Add(new ToolStripLabel("text"));
System\Windows\Forms\MdiControlStripTests.cs (3)
201
menuStrip.
Items
.AddRange((ToolStripMenuItem[])[toolStripMenuItem1, toolStripMenuItem2]);
247
menuStrip.
Items
.AddRange((ToolStripMenuItem[])[toolStripMenuItem1, toolStripMenuItem2]);
292
menuStrip.
Items
.AddRange((ToolStripMenuItem[])[toolStripMenuItem1, toolStripMenuItem2]);
System\Windows\Forms\MenuStripTests.cs (3)
99
Assert.Empty(control.
Items
);
100
Assert.Same(control.
Items
, control.
Items
);
System\Windows\Forms\StatusStripTests.cs (11)
99
Assert.Empty(control.
Items
);
100
Assert.Same(control.
Items
, control.
Items
);
913
Assert.Empty(control.
Items
);
928
Assert.Empty(control.
Items
);
939
Assert.Empty(control.
Items
);
966
Assert.Empty(control.
Items
);
981
Assert.Empty(control.
Items
);
992
Assert.Empty(control.
Items
);
1034
Assert.Empty(control.
Items
);
1045
Assert.Empty(control.
Items
);
System\Windows\Forms\ToolStrip.ToolStripAccessibleObjectWrapperForItemsOnOverflowTests.cs (3)
29
toolStrip.
Items
.Add(toolStripItem);
45
toolStrip.
Items
.Add(toolStripItem);
77
toolStrip.
Items
.Add(toolStripItem);
System\Windows\Forms\ToolStripButtonTests.Rendering.cs (6)
20
toolStrip.
Items
.Add(toolStripButton);
46
toolStrip.
Items
.Add(toolStripButton);
70
toolStrip.
Items
.Add(toolStripButton);
96
toolStrip.
Items
.Add(toolStripButton);
122
toolStrip.
Items
.Add(toolStripDropDownButton);
149
toolStrip.
Items
.Add(toolStripDropDownButton);
System\Windows\Forms\ToolStripControlHostTests.cs (45)
1399
Assert.Empty(parent.
Items
);
1408
Assert.Empty(parent.
Items
);
1410
Assert.Empty(otherParent.
Items
);
1418
Assert.Empty(parent.
Items
);
1420
Assert.Empty(otherParent.
Items
);
1429
Assert.Empty(parent.
Items
);
1430
Assert.Empty(otherParent.
Items
);
1438
Assert.Empty(parent.
Items
);
1440
Assert.Empty(otherParent.
Items
);
1442
Assert.Empty(statusParent.
Items
);
1468
Assert.Same(item, Assert.Single(owner.
Items
));
1470
Assert.Empty(parent.
Items
);
1479
Assert.Same(item, Assert.Single(owner.
Items
));
1481
Assert.Empty(parent.
Items
);
1483
Assert.Empty(otherParent.
Items
);
1491
Assert.Same(item, Assert.Single(owner.
Items
));
1493
Assert.Empty(parent.
Items
);
1495
Assert.Empty(otherParent.
Items
);
1503
Assert.Same(item, Assert.Single(owner.
Items
));
1506
Assert.Empty(parent.
Items
);
1507
Assert.Empty(otherParent.
Items
);
1515
Assert.Same(item, Assert.Single(owner.
Items
));
1517
Assert.Empty(parent.
Items
);
1519
Assert.Empty(otherParent.
Items
);
1521
Assert.Empty(statusParent.
Items
);
1538
Assert.Empty(parent.
Items
);
3087
Assert.Same(item, Assert.Single(owner.
Items
));
3113
Assert.Empty(parent.
Items
);
3122
Assert.Empty(parent.
Items
);
3124
Assert.Empty(otherParent.
Items
);
3133
Assert.Empty(parent.
Items
);
3135
Assert.Empty(otherParent.
Items
);
3144
Assert.Empty(parent.
Items
);
3146
Assert.Empty(otherParent.
Items
);
3155
Assert.Empty(parent.
Items
);
3157
Assert.Empty(otherParent.
Items
);
3186
Assert.Empty(parent.
Items
);
3196
Assert.Empty(parent.
Items
);
3198
Assert.Empty(otherParent.
Items
);
3208
Assert.Empty(parent.
Items
);
3210
Assert.Empty(otherParent.
Items
);
3220
Assert.Empty(parent.
Items
);
3222
Assert.Empty(otherParent.
Items
);
3232
Assert.Empty(parent.
Items
);
3234
Assert.Empty(otherParent.
Items
);
System\Windows\Forms\ToolStripDropDownTests.cs (44)
105
Assert.Empty(control.
Items
);
106
Assert.Same(control.
Items
, control.
Items
);
1589
control.
Items
.Add(item1);
1590
control.
Items
.Add(item2);
1654
control.
Items
.Add(child1);
1655
control.
Items
.Add(child2);
3045
Assert.Empty(control.
Items
);
3061
Assert.Empty(control.
Items
);
3073
Assert.Empty(control.
Items
);
3101
Assert.Empty(control.
Items
);
3118
Assert.Empty(control.
Items
);
3131
Assert.Empty(control.
Items
);
3158
Assert.Empty(control.
Items
);
3174
Assert.Empty(control.
Items
);
3186
Assert.Empty(control.
Items
);
3206
control.
Items
.Add(item1);
3207
control.
Items
.Add(item2);
3218
Assert.Empty(control.
Items
);
3238
Assert.Empty(control.
Items
);
3258
Assert.Empty(control.
Items
);
3289
Assert.Empty(control.
Items
);
3305
Assert.Empty(control.
Items
);
3317
Assert.Empty(control.
Items
);
3344
Assert.Empty(control.
Items
);
3355
Assert.Empty(control.
Items
);
3382
Assert.Empty(control.
Items
);
3399
Assert.Empty(control.
Items
);
3412
Assert.Empty(control.
Items
);
3445
Assert.Empty(control.
Items
);
3458
Assert.Empty(control.
Items
);
3479
control.
Items
.Add(item1);
3480
control.
Items
.Add(item2);
3491
Assert.Empty(control.
Items
);
3511
Assert.Empty(control.
Items
);
3531
Assert.Empty(control.
Items
);
3560
control.
Items
.Add(item1);
3561
control.
Items
.Add(item2);
3580
Assert.Equal(new ToolStripItem[] { item1, item2 }, control.
Items
.Cast<ToolStripItem>());
3599
Assert.Equal(new ToolStripItem[] { item1, item2 }, control.
Items
.Cast<ToolStripItem>());
4278
control.
Items
.Add(item1);
4279
control.
Items
.Add(item2);
4511
control.
Items
.Add(item1);
4512
control.
Items
.Add(item2);
System\Windows\Forms\ToolStripItemCollectionTests.cs (13)
112
contextMenuStrip.
Items
.AddRange(toolStripDropDownButton.DropDownItems);
113
Assert.Empty(contextMenuStrip.
Items
);
119
contextMenuStrip.
Items
.AddRange(toolStripDropDownButton.DropDownItems);
120
Assert.Equal(3, contextMenuStrip.
Items
.Count);
123
Assert.Equal("a", contextMenuStrip.
Items
[0].Text);
124
Assert.Equal("b", contextMenuStrip.
Items
[1].Text);
125
Assert.Equal("c", contextMenuStrip.
Items
[2].Text);
293
toolStrip1.
Items
.AddRange(items);
298
toolStrip1.
Items
.Contains(items[0]).Should().BeFalse();
299
toolStrip1.
Items
.Contains(items[1]).Should().BeTrue();
323
toolStrip1.
Items
.AddRange(items);
328
toolStrip1.
Items
.Contains(items[0]).Should().BeFalse();
329
toolStrip1.
Items
.Contains(items[1]).Should().BeTrue();
System\Windows\Forms\ToolStripItemRenderEventArgsTests.cs (1)
36
toolStrip.
Items
.Add(toolStripItem);
System\Windows\Forms\ToolStripItemTests.cs (60)
395
toolStrip.
Items
.Add(item);
6450
Assert.Same(item, Assert.Single(owner.
Items
));
6457
Assert.Same(item, Assert.Single(owner.
Items
));
6458
Assert.Empty(otherOwner.
Items
);
6465
Assert.Empty(owner.
Items
);
6466
Assert.Same(item, Assert.Single(otherOwner.
Items
));
6473
Assert.Empty(owner.
Items
);
6474
Assert.Empty(otherOwner.
Items
);
6481
Assert.Empty(owner.
Items
);
6482
Assert.Empty(otherOwner.
Items
);
6483
Assert.Same(item, Assert.Single(statusOwner.
Items
));
6500
Assert.Same(item, Assert.Single(owner.
Items
));
6507
Assert.Same(item, Assert.Single(owner.
Items
));
6508
Assert.Empty(otherOwner.
Items
);
6515
Assert.Empty(owner.
Items
);
6516
Assert.Same(item, Assert.Single(otherOwner.
Items
));
6523
Assert.Empty(owner.
Items
);
6524
Assert.Empty(otherOwner.
Items
);
6531
Assert.Empty(owner.
Items
);
6532
Assert.Empty(otherOwner.
Items
);
6533
Assert.Same(item, Assert.Single(statusOwner.
Items
));
6594
Assert.Same(item, Assert.Single(owner.
Items
));
6600
Assert.Same(item, Assert.Single(owner.
Items
));
6601
Assert.Empty(otherOwner.
Items
);
6607
Assert.Empty(owner.
Items
);
6608
Assert.Same(item, Assert.Single(otherOwner.
Items
));
6614
Assert.Empty(owner.
Items
);
6615
Assert.Empty(otherOwner.
Items
);
6622
Assert.Same(item, Assert.Single(owner.
Items
));
6623
Assert.Empty(otherOwner.
Items
);
6977
Assert.Empty(parent.
Items
);
6985
Assert.Empty(parent.
Items
);
6986
Assert.Empty(otherParent.
Items
);
6993
Assert.Empty(parent.
Items
);
6994
Assert.Empty(otherParent.
Items
);
7001
Assert.Empty(parent.
Items
);
7002
Assert.Empty(otherParent.
Items
);
7009
Assert.Empty(parent.
Items
);
7010
Assert.Empty(otherParent.
Items
);
7011
Assert.Empty(statusParent.
Items
);
7034
Assert.Empty(parent.
Items
);
7042
Assert.Empty(parent.
Items
);
7043
Assert.Empty(otherParent.
Items
);
7050
Assert.Empty(parent.
Items
);
7051
Assert.Empty(otherParent.
Items
);
7058
Assert.Empty(parent.
Items
);
7059
Assert.Empty(otherParent.
Items
);
7066
Assert.Empty(parent.
Items
);
7067
Assert.Empty(otherParent.
Items
);
7068
Assert.Empty(statusParent.
Items
);
7078
toolStrip.
Items
.Add(toolStripDropDownItem1);
9932
Assert.Empty(owner.
Items
);
9940
Assert.Empty(owner.
Items
);
9974
Assert.Empty(parent.
Items
);
9982
Assert.Empty(parent.
Items
);
10085
Assert.Equal(!disposing, owner.
Items
.Contains(item));
10093
Assert.Equal(!disposing, owner.
Items
.Contains(item));
10129
Assert.Empty(parent.
Items
);
10137
Assert.Empty(parent.
Items
);
15412
menuStrip1.
Items
.AddRange(new ToolStripMenuItem[] { toolStripMenuItem1, toolStripMenuItem2, toolStripMenuItem3 });
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (1)
83
owner.
Items
.Add(ownedDropDownItem);
System\Windows\Forms\ToolStripSplitStackDragDropHandlerTests.cs (3)
56
_toolStrip.
Items
[0].Should().Be(toolStripItem);
67
_toolStrip.
Items
.Count.Should().Be(0);
121
_toolStrip.
Items
[0].Should().Be(newToolStripItem);
System\Windows\Forms\ToolStripTests.cs (83)
117
Assert.Empty(control.
Items
);
118
Assert.Same(control.
Items
, control.
Items
);
271
Assert.NotSame(items, control.
Items
);
272
Assert.Same(control.
Items
, control.
Items
);
273
Assert.Equal(items, control.
Items
.Cast<ToolStripItem>());
389
control.
Items
.Add(item);
534
control.
Items
.Add(item);
1505
control.
Items
.Add(item1);
1506
control.
Items
.Add(item2);
1570
control.
Items
.Add(child1);
1571
control.
Items
.Add(child2);
1631
toolStrip1.
Items
.Add(item1);
1632
toolStrip1.
Items
.Add(item2);
1651
toolStrip1.
Items
.Add(item1);
1652
toolStrip1.
Items
.Add(item2);
3478
control.
Items
.Add(item1);
3479
control.
Items
.Add(item2);
3508
control.
Items
.Add(item1);
3509
control.
Items
.Add(item2);
3609
control.
Items
.Add(item);
3895
control.
Items
.Add(item1);
3896
control.
Items
.Add(item2);
3938
control.
Items
.Add(item1);
3939
control.
Items
.Add(item2);
3975
control.
Items
.Add(item1);
3976
control.
Items
.Add(item2);
4040
control.
Items
.Add(item1);
4041
control.
Items
.Add(item2);
4363
Assert.Empty(control.
Items
);
4379
Assert.Empty(control.
Items
);
4391
Assert.Empty(control.
Items
);
4417
Assert.Empty(control.
Items
);
4433
Assert.Empty(control.
Items
);
4445
Assert.Empty(control.
Items
);
4465
control.
Items
.Add(item1);
4466
control.
Items
.Add(item2);
4477
Assert.Empty(control.
Items
);
4497
Assert.Empty(control.
Items
);
4517
Assert.Empty(control.
Items
);
4548
Assert.Empty(control.
Items
);
4564
Assert.Empty(control.
Items
);
4576
Assert.Empty(control.
Items
);
4603
Assert.Empty(control.
Items
);
4614
Assert.Empty(control.
Items
);
4633
control.
Items
.Add(item1);
4634
control.
Items
.Add(item2);
4645
Assert.Empty(control.
Items
);
4665
Assert.Empty(control.
Items
);
4685
Assert.Empty(control.
Items
);
4714
control.
Items
.Add(item1);
4715
control.
Items
.Add(item2);
4734
Assert.Equal(new ToolStripItem[] { item1, item2 }, control.
Items
.Cast<ToolStripItem>());
4753
Assert.Equal(new ToolStripItem[] { item1, item2 }, control.
Items
.Cast<ToolStripItem>());
4814
toolStrip.
Items
.AddRange((ToolStripButton[])[toolStripButton1, toolStripButton2, toolStripButton3]);
4821
ToolStripItem actual = toolStrip.GetNextItem(toolStrip.
Items
[0], ArrowDirection.Right);
4835
toolStrip.
Items
.AddRange((ToolStripButton[])[toolStripButton1, toolStripButton2, toolStripButton3]);
4860
toolStrip.
Items
.AddRange((ToolStripButton[])[toolStripButton1, toolStripButton2, toolStripButton3]);
4867
ToolStripItem actual = toolStrip.GetNextItem(toolStrip.
Items
[0], ArrowDirection.Left);
4881
toolStrip.
Items
.AddRange((ToolStripButton[])[toolStripButton1, toolStripButton2, toolStripButton3]);
5283
control.
Items
.Add(item1);
5284
control.
Items
.Add(item2);
5320
control.
Items
.Add(item1);
5321
control.
Items
.Add(item2);
5456
control.
Items
.Add(item1);
5457
control.
Items
.Add(item2);
5656
control.
Items
.Add(item1);
5657
control.
Items
.Add(item2);
5828
toolStrip.
Items
.Add(item);
6406
control.
Items
.Add(item1);
6407
control.
Items
.Add(item2);
6459
control.
Items
.Add(item1);
6460
control.
Items
.Add(item2);
6697
control.
Items
.Add(item1);
6698
control.
Items
.Add(item2);
6742
control.
Items
.Add(item1);
6743
control.
Items
.Add(item2);
7295
toolStrip.
Items
.AddRange((ToolStripItem[])[toolStripMenuItem1, toolStripMenuItem2, toolStripMenuItem3]);
7299
Assert.Equal(toolStrip.
Items
[2], previousToolStripItem1);
7302
Assert.Equal(toolStrip.
Items
[0], previousToolStripItem2);
7312
using ToolStripItem toolStripItem = menuStrip.
Items
.Add("toolStripItem");
7333
using ToolStripItem toolStripItem = menuStrip.
Items
.Add("toolStripItem");
System.Windows.Forms.UI.IntegrationTests (8)
Dpi\ToolStripItemTests.Dpi.cs (1)
41
toolStrip.
Items
.Add(toolStripItemOpen);
DragDropTests.cs (3)
977
ToolStrip.
Items
.Add(toolStripDropDownButton);
991
_contextMenuStrip.
Items
.Clear();
1004
_contextMenuStrip.
Items
.Add(dragAcceptItem);
MenuStripTests.cs (1)
20
menuStrip.
Items
.AddRange(toolStripMenuItem1);
ToolStripTests.cs (3)
41
toolStrip.
Items
.Add(toolStripButton);
79
menuStrip.
Items
.Add(menu1);
80
menuStrip.
Items
.Add(hiddenMenu);
WinFormsControlsTest (24)
Dialogs.cs (2)
56
toolbar.
Items
.Add(new ToolStripSeparator { Visible = true });
57
toolbar.
Items
.Add(_btnOpen);
DragDrop.cs (5)
456
toolStrip.
Items
.Add(catToolStripDropDownButton);
469
_catContextMenuStrip.
Items
.Clear();
504
_catContextMenuStrip.
Items
.Add(dragAcceptItem);
505
_catContextMenuStrip.
Items
.Add(nyanCatItem);
506
_catContextMenuStrip.
Items
.Add(asciiCatItem);
MdiChild.cs (2)
16
_menuStrip.
Items
.Add(new ToolStripMenuItem { Text = "Child1" });
17
_menuStrip.
Items
.Add(new ToolStripMenuItem
MdiParent.cs (2)
31
_menuStrip.
Items
.Add(menu);
40
_menuStrip.
Items
.Add(item);
MenuStripAndCheckedListBox.Designer.cs (1)
67
this.menuStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
MessageBoxes.cs (2)
42
toolbar.
Items
.Add(new ToolStripSeparator { Visible = true });
43
toolbar.
Items
.Add(_btnOpen);
ToolStripSeparatorPreferredSize.cs (1)
42
_toolStrip1.
Items
.AddRange((ToolStripItem[])
ToolStripTests.cs (4)
15
toolStrip1.
Items
.Add(new ToolStripControlHost(new RadioButton() { Text = "RadioButton" })); // RadioButton supports UIA
16
toolStrip1.
Items
.Add(new ToolStripControlHost(new HScrollBar() { Value = 30 })); // HScrollBar doesn't support UIA
17
statusStrip1.
Items
.Add(new ToolStripControlHost(new RadioButton() { Text = "RadioButton" })); // RadioButton supports UIA
18
statusStrip1.
Items
.Add(new ToolStripControlHost(new HScrollBar() { Value = 30 })); // HScrollBar doesn't support UIA
ToolStripTests.Designer.cs (5)
83
this.toolStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
97
this.toolStrip2.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
117
this.toolStrip3.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
129
this.toolStrip4.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {
378
this.statusStrip1.
Items
.AddRange(new System.Windows.Forms.ToolStripItem[] {