1 override of DisplayedItems
System.Windows.Forms (1)
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.cs (1)
20protected internal override ToolStripItemCollection DisplayedItems
87 references to DisplayedItems
System.Windows.Forms (82)
System\Windows\Forms\Controls\Menus\MenuStrip.cs (3)
206if (DisplayedItems.Count > 0) 208if (DisplayedItems[0] is MdiControlStrip.SystemMenuItem) 210SelectNextToolStripItem(DisplayedItems[0], forward: true);
System\Windows\Forms\Controls\ToolStrips\StatusStrip.cs (14)
337int itemCount = DisplayedItems.Count; 340inDisplayedItemCollection = DisplayedItems.Contains(item); 350if (itemCount != DisplayedItems.Count || (item is not null && (inDisplayedItemCollection != DisplayedItems.Contains(item)))) 468for (int i = 0; i < DisplayedItems.Count; i++) 477bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 478DisplayedItems[i].Anchor = (spring) ? AllAnchor : VerticalAnchor; 496TableLayoutSettings.ColumnCount = DisplayedItems.Count + 1; // add an extra cell so it fills the remaining space 499for (int i = DisplayedItems.Count; i < TableLayoutSettings.ColumnStyles.Count; i++) 515for (int i = 0; i < DisplayedItems.Count; i++) 524bool spring = (DisplayedItems[i] is ToolStripStatusLabel panel && panel.Spring); 525DisplayedItems[i].Anchor = (spring) ? AllAnchor : HorizontalAnchor; 545TableLayoutSettings.RowCount = DisplayedItems.Count + 1; // add an extra cell so it fills the remaining space 548for (int i = DisplayedItems.Count; i < TableLayoutSettings.RowStyles.Count; i++)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (40)
1787ToolStripItem[] displayedItems = new ToolStripItem[DisplayedItems.Count]; 1788DisplayedItems.CopyTo(displayedItems, 0); 2070if (DisplayedItems.Count <= 0) 2081start ??= forward ? DisplayedItems[DisplayedItems.Count - 1] : DisplayedItems[0]; 2083int current = DisplayedItems.IndexOf(start); 2089int count = DisplayedItems.Count; 2105return DisplayedItems[current]; 2108if (DisplayedItems[current].CanKeyboardSelect) 2110return DisplayedItems[current]; 2113while (DisplayedItems[current] != start); 2143for (int i = 0; i < DisplayedItems.Count; i++) 2145ToolStripItem otherItem = DisplayedItems[i]; 2404for (int i = 0; i < DisplayedItems.Count; i++) 2406if (DisplayedItems[i].Selected) 2408selectedItem = DisplayedItems[i]; 2542for (int j = 0; j < DisplayedItems.Count; j++) 2544if (((DisplayedItems[j].DisplayStyle & ToolStripItemDisplayStyle.Text) == ToolStripItemDisplayStyle.Text)) 2546DisplayedItems[j].InvalidateItemLayout("ShowKeyboardFocusCues"); 2878startIndex = DisplayedItems.IndexOf(startingItem); 2888for (int i = 0; i < DisplayedItems.Count; i++) 2890ToolStripItem currentItem = DisplayedItems[index]; 2892index = (index + 1) % DisplayedItems.Count; 2951for (int i = 0; i < DisplayedItems.Count; i++) 2953ToolStripItem currentItem = DisplayedItems[index]; 2954index = (index + 1) % DisplayedItems.Count; 3499for (int i = 0; i < DisplayedItems.Count; i++) 3501ToolStripItem item = DisplayedItems[i]; 3887for (int i = 0; i < DisplayedItems.Count; i++) 3889if (DisplayedItems[i] is null || DisplayedItems[i].ParentInternal != this) 3894bounds = DisplayedItems[i].Bounds; 3897if (_toolStripGrip is not null && DisplayedItems[i] == _toolStripGrip) 3904return DisplayedItems[i]; 4235DisplayedItems.Clear(); 4245DisplayedItems.Add(Grip); 4296DisplayedItems.Add(item); 4323DisplayedItems.Add(OverflowButton); 4356DisplayedItems.Add(item);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (4)
158: owner.DisplayedItems; 270if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.DisplayedItems is null) 275return owner.DisplayedItems.Count; 307? owner.DisplayedItems
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (1)
1589CancelEventArgs openEventArgs = new(cancel: DisplayedItems.Count == 0);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (3)
185int index = dropDown.DisplayedItems.IndexOf(_owner); 195if (index >= 0 && index < dropDown.DisplayedItems.Count) 197ToolStripItem item = dropDown.DisplayedItems[index];
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.cs (2)
777DisplayedItems.Insert(0, UpScrollButton); 778DisplayedItems.Add(DownScrollButton);
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (2)
2018int index = ParentInternal.DisplayedItems.IndexOf(this); 3550ToolStripItemCollection items = _parent.DisplayedItems;
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.ToolStripMenuItemAccessibleObject.cs (2)
63ToolStripItemCollection? displayedItems = _owningToolStripMenuItem.ParentInternal?.DisplayedItems; 98ToolStripItemCollection? displayedItems = _owningToolStripMenuItem.ParentInternal?.DisplayedItems;
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitStackDragDropHandler.cs (11)
172for (int i = 0; i < _owner.DisplayedItems.Count; i++) 174Rectangle bounds = _owner.DisplayedItems[i].Bounds; 175bounds.Inflate(_owner.DisplayedItems[i].Margin.Size); 179return _owner.Items.IndexOf(_owner.DisplayedItems[i]); 183if (_owner.DisplayedItems.Count > 0) 185for (int i = 0; i < _owner.DisplayedItems.Count; i++) 187if (_owner.DisplayedItems[i].Alignment == ToolStripItemAlignment.Right) 191return _owner.Items.IndexOf(_owner.DisplayedItems[i - 1]); 194return _owner.Items.IndexOf(_owner.DisplayedItems[i]); 198return _owner.Items.IndexOf(_owner.DisplayedItems[_owner.DisplayedItems.Count - 1]);
System.Windows.Forms.Tests (5)
System\Windows\Forms\MenuStripTests.cs (1)
878public new ToolStripItemCollection DisplayedItems => base.DisplayedItems;
System\Windows\Forms\StatusStripTests.cs (1)
1300public new ToolStripItemCollection DisplayedItems => base.DisplayedItems;
System\Windows\Forms\ToolStripDropDownTests.cs (1)
5118public new ToolStripItemCollection DisplayedItems => base.DisplayedItems;
System\Windows\Forms\ToolStripTests.cs (2)
7501public new ToolStripItemCollection DisplayedItems => base.DisplayedItems; 7554public new ToolStripItemCollection DisplayedItems => base.DisplayedItems;