7 types derived from ToolStripDropDownItem
System.Windows.Forms (3)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
15public partial class ToolStripDropDownButton : ToolStripDropDownItem
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
20public partial class ToolStripMenuItem : ToolStripDropDownItem
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
13public partial class ToolStripSplitButton : ToolStripDropDownItem
System.Windows.Forms.Tests (4)
System\Windows\Forms\AccessibleObjects\ToolStripDropDownItemAccessibleObjectTests.cs (1)
221private class SubToolStripDropDownItem : ToolStripDropDownItem
System\Windows\Forms\ToolStripDropDownItemTests.cs (2)
471private class CustomCreateDefaultDropDownToolStripDropDownItem : ToolStripDropDownItem 491private class SubToolStripDropDownItem : ToolStripDropDownItem
System\Windows\Forms\ToolStripItemTests.cs (1)
15644private class ToolStripDropDownItemWithAccessibleObjectFieldAccessor : ToolStripDropDownItem
179 references to ToolStripDropDownItem
System.Windows.Forms (25)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
1886&& displayedItems[i] is ToolStripDropDownItem dropDownItem 2559if (dismissingItem is ToolStripDropDownItem item && !item.HasDropDownItems) 3431if (!IsDropDown && (!(item is ToolStripDropDownItem))) 4052if (toolStripItem is ToolStripDropDownItem dropDownItem && dropDownItem.DropDownItems.Count > 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (6)
708internal ToolStripDropDownItem? OwnerDropDownItem 710get { return OwnerItem as ToolStripDropDownItem; } 1087if (_ownerItem is not null and ToolStripDropDownItem) 1089screenPoint = ((ToolStripDropDownItem)_ownerItem).DropDownLocation; 1109if ((_ownerItem is not null) && (_ownerItem is ToolStripDropDownItem item) && (ParentInternal is not null)) 1253if ((!(e.ClickedItem is ToolStripDropDownItem dismissingItem)) // it's not a dropdownitem
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (5)
766Stack<ToolStripDropDownItem> itemsStack = new(); 772var item = itemsStack.Pop(); 796if (typeof(ToolStripDropDownItem).IsAssignableFrom(childItem.GetType())) 798if (((ToolStripDropDownItem)childItem)._dropDown is not null) 800itemsStack.Push((ToolStripDropDownItem)childItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (3)
12private readonly ToolStripDropDownItem _owner; 14public ToolStripDropDownItemAccessibleObject(ToolStripDropDownItem item) : base(item) 35if (Owner is ToolStripDropDownItem item && item.HasDropDownItems)
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (1)
270if (itemsToLookIn[j] is not ToolStripDropDownItem item)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
1160if (item is ToolStripDropDownItem tsddownDest && source is ToolStripDropDownItem tsddownSrc && tsddownSrc.DropDownItems.Count != 0)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
228if (e.Item is ToolStripDropDownItem item && item.Pressed && item.HasDropDownItems) 679if (item is ToolStripDropDownItem)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (2)
98ToolStripDropDownItem? ownerItem = dropDown.OwnerItem as ToolStripDropDownItem;
System.Windows.Forms.Design (117)
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (2)
110ToolStripDropDownItem? dropDownItem = item as ToolStripDropDownItem;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
138if (parentDropDown.OwnerItem is ToolStripDropDownItem ownerItem)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (2)
290private bool CheckDropDownBounds(ToolStripDropDownItem dropDownItem, Glyph childGlyph, GlyphCollection glyphs) 314if (component is ToolStripDropDownItem item)
System\Windows\Forms\Design\ToolStripDesigner.cs (12)
792ToolStripDropDown topmost = ToolStripItemDesigner.GetFirstDropDown((ToolStripDropDownItem)(ownerItem)); 807ToolStripDropDown topmost = ToolStripItemDesigner.GetFirstDropDown((ToolStripDropDownItem)parentItem); 833if (SelectionService.PrimarySelection is ToolStripDropDownItem selectedItem) 849if (parent.OwnerItem is ToolStripDropDownItem ownerItem) 1125if (e.Component is ToolStripDropDownItem dropDownItem) 1928if (primaryItem is ToolStripDropDownItem primaryDropDownItem) 2015if (_toolStripAdornerWindowService is not null && sender is ToolStripDropDownItem ddi) 2044ToolStripDropDownItem ddi = sender as ToolStripDropDownItem; 2090ToolStripDropDownItem ddi = sender as ToolStripDropDownItem; 2154if (SelectionService.PrimarySelection is ToolStripDropDownItem selectedItem)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
92if (stripItem is not ToolStripDropDownItem) 98parent = ((ToolStripDropDownItem)stripItem).DropDown;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (2)
437if (comp is ToolStripDropDownItem currentItem) 472topmost = ToolStripItemDesigner.GetFirstDropDown((ToolStripDropDownItem)ownerItem);
System\Windows\Forms\Design\ToolStripDropDownItemDesigner.cs (1)
28if (Component is ToolStripDropDownItem item && item.DropDown.IsAutoGenerated)
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
99if (dropDown.OwnerItem is ToolStripDropDownItem parentItem)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (5)
604if (glyphItem is ToolStripDropDownItem ddItem) 615ToolStripDropDownItem ownerItem = dropDown.OwnerItem as ToolStripDropDownItem; 793if (item is ToolStripDropDownItem) 803if (dropDown.OwnerItem is ToolStripDropDownItem ownerItem)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
205if (_currentItem is ToolStripDropDownItem) 377if (parent.OwnerItem is ToolStripDropDownItem ownerItem)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (19)
182if (ToolStripItem is ToolStripDropDownItem) 184ToolStripDropDownItem item = ToolStripItem as ToolStripDropDownItem; 429if (newItem is ToolStripDropDownItem dropDown) 525private void FireComponentChanging(ToolStripDropDownItem parent) 540if (item is ToolStripDropDownItem dropDownItem && dropDownItem.DropDownItems.Count > 1 /*including TN*/) 547private void FireComponentChanged(ToolStripDropDownItem parent) 562if (item is ToolStripDropDownItem dropDownItem && dropDownItem.DropDownItems.Count > 1 /*including TN*/) 678if (site is not null && Component is ToolStripDropDownItem) 766ToolStripDropDownItem dropDownItem = ToolStripItem as ToolStripDropDownItem; 767if (dropDownItem is not null && typeof(ToolStripDropDownItem).IsAssignableFrom(t)) 800if (component is ToolStripDropDownItem) 991if (parentDropDown.OwnerItem is ToolStripDropDownItem parentItem) 1113if (ToolStripItem is ToolStripDropDownItem) 1146private static void SerializeDropDownItems(ToolStripDropDownItem parent, ref SerializationStore _serializedDataForDropDownItems, ComponentSerializationService _serializationService) 1154if (item is ToolStripDropDownItem dropDownItem) 1284if (ToolStripItem is ToolStripDropDownItem) // We have no place to show this item... so Hide the DropDown 1286if (ToolStripItem is ToolStripDropDownItem ddItem)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (13)
538if (OwnerItemAfterCut is ToolStripDropDownItem parentItem) 658if (parentDropDown.OwnerItem is ToolStripDropDownItem ownerItem) 668if (selSvc.PrimarySelection is ToolStripDropDownItem dropDownItem && dropDownItem.DropDown.Visible) 866ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem; 961ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem; 1255item = ShiftPrimaryItem as ToolStripDropDownItem; 1258item ??= SelectedDesignerControl as ToolStripDropDownItem; 1265if (item is ToolStripDropDownItem dropDownItem) 1386ToolStripDropDownItem dropDownItem = item as ToolStripDropDownItem; 1868ToolStripDropDown dropDown = ToolStripItemDesigner.GetFirstDropDown((ToolStripDropDownItem)parentItem);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (44)
246private ToolStripDropDownItem MenuItem 248get => ToolStripItem as ToolStripDropDownItem; 294ToolStripDropDownItem parentItem = dropDown.OwnerItem as ToolStripDropDownItem; 405private void AddBodyGlyphs(ToolStripDropDownItem item) 612if (MenuItem.DropDownItems[index] is ToolStripDropDownItem currentItem) 944private static bool CheckSameOwner(ToolStripDropDownItem lastSelected, ToolStripDropDownItem currentSelected) 969if (MenuItem.DropDownItems[index] is ToolStripDropDownItem newItem) 981ToolStripDropDownItem currentItem = MenuItem; 984currentItem = (ToolStripDropDownItem)dropDown.OwnerItem; 1125ToolStripDropDownItem ddi = sender as ToolStripDropDownItem; 1137ToolStripDropDownItem ddi = sender as ToolStripDropDownItem; 1159if (sender is ToolStripDropDownItem ddi) 1269ToolStripDropDownItem selectedItem = null; 1274selectedItem = ((ToolStripDropDown)item.Owner).OwnerItem as ToolStripDropDownItem; 1279selectedItem = _selectionService.PrimarySelection as ToolStripDropDownItem; 1388ToolStripDropDownItem dropDownItem = toolItem as ToolStripDropDownItem; 1440private void HideAllDropDowns(ToolStripDropDownItem item) 1456item = (ToolStripDropDownItem)itemDropDown.OwnerItem; 1473private void HideSiblingDropDowns(ToolStripDropDownItem item) 1483item = (ToolStripDropDownItem)dropDown.OwnerItem; 1557internal void InitializeBodyGlyphsForItems(bool addGlyphs /* true for add */, ToolStripDropDownItem item) 1592if (MenuItem.DropDown.OwnerItem is ToolStripDropDownItem currentOwner && currentOwner != MenuItem) 1641if (startDropDown.OwnerItem is ToolStripDropDownItem ownerItem) 1898ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)owner.OwnerItem; 1981ToolStripDropDownItem ownerItem = (ToolStripDropDownItem)owner.OwnerItem; 1988if (itemToBeDeleted is ToolStripDropDownItem dropDownItem) 2328internal void RemoveTypeHereNode(ToolStripDropDownItem ownerItem) 2363ToolStripDropDownItem editedItem = (ToolStripDropDownItem)MenuItem.DropDownItems[index + 1]; 2388private void RemoveBodyGlyphs(ToolStripDropDownItem item) 2431internal void ResetGlyphs(ToolStripDropDownItem item) 2550private void SelectItems(ToolStripDropDownItem oldSelection, ISelectionService selSvc) 2570internal void ShowOwnerDropDown(ToolStripDropDownItem currentSelection) 2577currentSelection = (ToolStripDropDownItem)currentDropDown.OwnerItem; 2700ToolStripDropDownItem ownerItem = null; 2703ownerItem = parentToolStrip.OwnerItem as ToolStripDropDownItem; 2778if (primaryItem is ToolStripDropDownItem dropDownItem)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (11)
694if (_component is ToolStripDropDownItem stripItem) 888if (_activeItem is ToolStripDropDownItem item && !item.IsOnDropDown) 1230ToolStripDropDownItem stripItem = sender as ToolStripDropDownItem; 1344if (_component is ToolStripDropDownItem stripItem) 1377if (currentItem is ToolStripDropDownItem) 1481if (currentItem is ToolStripDropDownItem stripItem) 1498if (currentItem is MenuStrip or ToolStripDropDownItem) 1681if (_currentItem is ToolStripDropDownItem) 1738if (_currentItem is ToolStripDropDownItem) 1854if (_owner._component is MenuStrip or ToolStripDropDownItem)
System.Windows.Forms.Tests (37)
System\Windows\Forms\AccessibleObjects\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObjectTests.cs (31)
12IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<ToolStripDropDownItem>().Select(type => type); 33using ToolStripDropDownItem item = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(itemType); 79IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<ToolStripDropDownItem>().Select(type => type); 108using ToolStripDropDownItem ownerItem = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(ownerType); 109using ToolStripDropDownItem parentItem1 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(parentType); 110using ToolStripDropDownItem parentItem2 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(parentType); 111using ToolStripDropDownItem childItem1 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 112using ToolStripDropDownItem childItem2 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 113using ToolStripDropDownItem childItem3 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 114using ToolStripDropDownItem childItem4 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 171IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<ToolStripDropDownItem>().Select(type => type); 193using ToolStripDropDownItem parentItem1 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(parentType); 194using ToolStripDropDownItem parentItem2 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(parentType); 195using ToolStripDropDownItem childItem1 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 196using ToolStripDropDownItem childItem2 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 197using ToolStripDropDownItem childItem3 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType); 198using ToolStripDropDownItem childItem4 = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(childType);
System\Windows\Forms\AccessibleObjects\ToolStripScrollButton.ToolStripScrollButtonAccessibleObjectTests.cs (6)
12IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<ToolStripDropDownItem>().Select(type => type); 33using ToolStripDropDownItem ownerItem = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(itemType); 95using ToolStripDropDownItem ownerItem = ReflectionHelper.InvokePublicConstructor<ToolStripDropDownItem>(itemType); 133using ToolStripDropDownItem ownerItem = new ToolStripDropDownButton();