7 types derived from ToolStripDropDownItem
System.Windows.Forms (3)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (1)
15
public partial class ToolStripDropDownButton :
ToolStripDropDownItem
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (1)
20
public partial class ToolStripMenuItem :
ToolStripDropDownItem
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
13
public partial class ToolStripSplitButton :
ToolStripDropDownItem
System.Windows.Forms.Tests (4)
System\Windows\Forms\AccessibleObjects\ToolStripDropDownItemAccessibleObjectTests.cs (1)
221
private class SubToolStripDropDownItem :
ToolStripDropDownItem
System\Windows\Forms\ToolStripDropDownItemTests.cs (2)
471
private class CustomCreateDefaultDropDownToolStripDropDownItem :
ToolStripDropDownItem
491
private class SubToolStripDropDownItem :
ToolStripDropDownItem
System\Windows\Forms\ToolStripItemTests.cs (1)
15624
private class ToolStripDropDownItemWithAccessibleObjectFieldAccessor :
ToolStripDropDownItem
178 references to ToolStripDropDownItem
System.Windows.Forms (24)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (4)
1800
&& displayedItems[i] is
ToolStripDropDownItem
dropDownItem
2475
if (dismissingItem is
ToolStripDropDownItem
item && !item.HasDropDownItems)
3317
if (!IsDropDown && (!(item is
ToolStripDropDownItem
)))
3939
if (toolStripItem is
ToolStripDropDownItem
dropDownItem && dropDownItem.DropDownItems.Count > 0)
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (5)
630
internal
ToolStripDropDownItem
? OwnerDropDownItem
632
get { return OwnerItem as
ToolStripDropDownItem
; }
991
Point screenPoint = _ownerItem is
ToolStripDropDownItem
dropDownItem
1002
Point parentClientPoint = (_ownerItem is
ToolStripDropDownItem
dropDownItem) && (ParentInternal is not null)
1133
if ((!(e.ClickedItem is
ToolStripDropDownItem
dismissingItem)) // it's not a dropdownitem
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItem.cs (5)
766
Stack<
ToolStripDropDownItem
> itemsStack = new();
772
var
item = itemsStack.Pop();
796
if (typeof(
ToolStripDropDownItem
).IsAssignableFrom(childItem.GetType()))
798
if (((
ToolStripDropDownItem
)childItem)._dropDown is not null)
800
itemsStack.Push((
ToolStripDropDownItem
)childItem);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownItemAccessibleObject.cs (3)
12
private readonly
ToolStripDropDownItem
_owner;
14
public ToolStripDropDownItemAccessibleObject(
ToolStripDropDownItem
item) : base(item)
35
if (Owner is
ToolStripDropDownItem
item && item.HasDropDownItems)
System\Windows\Forms\Controls\ToolStrips\ToolStripItemCollection.cs (1)
277
if (itemsToLookIn[j] is not
ToolStripDropDownItem
item)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (2)
1160
if (item is
ToolStripDropDownItem
tsddownDest && source is
ToolStripDropDownItem
tsddownSrc && tsddownSrc.DropDownItems.Count != 0)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (2)
228
if (e.Item is
ToolStripDropDownItem
item && item.Pressed && item.HasDropDownItems)
679
if (item is
ToolStripDropDownItem
)
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (2)
98
ToolStripDropDownItem
? ownerItem = dropDown.OwnerItem as
ToolStripDropDownItem
;
System.Windows.Forms.Design (117)
System\Windows\Forms\Design\BindingNavigatorDesigner.cs (2)
110
ToolStripDropDownItem
? dropDownItem = item as
ToolStripDropDownItem
;
System\Windows\Forms\Design\TemplateNodeCustomMenuItemCollection.cs (1)
138
if (parentDropDown.OwnerItem is
ToolStripDropDownItem
ownerItem)
System\Windows\Forms\Design\ToolStripContainerDesigner.cs (2)
290
private bool CheckDropDownBounds(
ToolStripDropDownItem
dropDownItem, Glyph childGlyph, GlyphCollection glyphs)
314
if (component is
ToolStripDropDownItem
item)
System\Windows\Forms\Design\ToolStripDesigner.cs (12)
785
ToolStripDropDown topmost = ToolStripItemDesigner.GetFirstDropDown((
ToolStripDropDownItem
)(ownerItem));
800
ToolStripDropDown topmost = ToolStripItemDesigner.GetFirstDropDown((
ToolStripDropDownItem
)parentItem);
826
if (SelectionService.PrimarySelection is
ToolStripDropDownItem
selectedItem)
842
if (parent.OwnerItem is
ToolStripDropDownItem
ownerItem)
1118
if (e.Component is
ToolStripDropDownItem
dropDownItem)
1909
if (primaryItem is
ToolStripDropDownItem
primaryDropDownItem)
1996
if (_toolStripAdornerWindowService is not null && sender is
ToolStripDropDownItem
ddi)
2025
ToolStripDropDownItem
ddi = sender as
ToolStripDropDownItem
;
2071
ToolStripDropDownItem
ddi = sender as
ToolStripDropDownItem
;
2135
if (SelectionService.PrimarySelection is
ToolStripDropDownItem
selectedItem)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
92
if (stripItem is not
ToolStripDropDownItem
)
98
parent = ((
ToolStripDropDownItem
)stripItem).DropDown;
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (2)
437
if (comp is
ToolStripDropDownItem
currentItem)
472
topmost = ToolStripItemDesigner.GetFirstDropDown((
ToolStripDropDownItem
)ownerItem);
System\Windows\Forms\Design\ToolStripDropDownItemDesigner.cs (1)
28
if (Component is
ToolStripDropDownItem
item && item.DropDown.IsAutoGenerated)
System\Windows\Forms\Design\ToolStripInSituService.cs (1)
99
if (dropDown.OwnerItem is
ToolStripDropDownItem
parentItem)
System\Windows\Forms\Design\ToolStripItemBehavior.cs (5)
604
if (glyphItem is
ToolStripDropDownItem
ddItem)
615
ToolStripDropDownItem
ownerItem = dropDown.OwnerItem as
ToolStripDropDownItem
;
793
if (item is
ToolStripDropDownItem
)
803
if (dropDown.OwnerItem is
ToolStripDropDownItem
ownerItem)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
205
if (_currentItem is
ToolStripDropDownItem
)
377
if (parent.OwnerItem is
ToolStripDropDownItem
ownerItem)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (19)
182
if (ToolStripItem is
ToolStripDropDownItem
)
184
ToolStripDropDownItem
item = ToolStripItem as
ToolStripDropDownItem
;
429
if (newItem is
ToolStripDropDownItem
dropDown)
525
private void FireComponentChanging(
ToolStripDropDownItem
parent)
540
if (item is
ToolStripDropDownItem
dropDownItem && dropDownItem.DropDownItems.Count > 1 /*including TN*/)
547
private void FireComponentChanged(
ToolStripDropDownItem
parent)
562
if (item is
ToolStripDropDownItem
dropDownItem && dropDownItem.DropDownItems.Count > 1 /*including TN*/)
678
if (site is not null && Component is
ToolStripDropDownItem
)
766
ToolStripDropDownItem
dropDownItem = ToolStripItem as
ToolStripDropDownItem
;
767
if (dropDownItem is not null && typeof(
ToolStripDropDownItem
).IsAssignableFrom(t))
800
if (component is
ToolStripDropDownItem
)
991
if (parentDropDown.OwnerItem is
ToolStripDropDownItem
parentItem)
1113
if (ToolStripItem is
ToolStripDropDownItem
)
1146
private static void SerializeDropDownItems(
ToolStripDropDownItem
parent, ref SerializationStore _serializedDataForDropDownItems, ComponentSerializationService _serializationService)
1154
if (item is
ToolStripDropDownItem
dropDownItem)
1284
if (ToolStripItem is
ToolStripDropDownItem
) // We have no place to show this item... so Hide the DropDown
1286
if (ToolStripItem is
ToolStripDropDownItem
ddItem)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (13)
530
if (cutCommand && OwnerItemAfterCut is
ToolStripDropDownItem
parentItem)
642
if (parentDropDown.OwnerItem is
ToolStripDropDownItem
ownerItem)
652
if (selSvc.PrimarySelection is
ToolStripDropDownItem
dropDownItem && dropDownItem.DropDown.Visible)
850
ToolStripDropDownItem
ownerItem = (
ToolStripDropDownItem
)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem;
945
ToolStripDropDownItem
ownerItem = (
ToolStripDropDownItem
)((ToolStripDropDown)(typeHereNode.Owner)).OwnerItem;
1239
item = ShiftPrimaryItem as
ToolStripDropDownItem
;
1242
item ??= SelectedDesignerControl as
ToolStripDropDownItem
;
1251
&& item is
ToolStripDropDownItem
dropDownItem)
1368
ToolStripDropDownItem
dropDownItem = item as
ToolStripDropDownItem
;
1851
ToolStripDropDown dropDown = ToolStripItemDesigner.GetFirstDropDown((
ToolStripDropDownItem
)parentItem);
System\Windows\Forms\Design\ToolStripMenuItemDesigner.cs (44)
246
private
ToolStripDropDownItem
MenuItem
248
get => ToolStripItem as
ToolStripDropDownItem
;
294
ToolStripDropDownItem
parentItem = dropDown.OwnerItem as
ToolStripDropDownItem
;
405
private void AddBodyGlyphs(
ToolStripDropDownItem
item)
602
if (MenuItem.DropDownItems[index] is
ToolStripDropDownItem
currentItem)
928
private static bool CheckSameOwner(
ToolStripDropDownItem
lastSelected,
ToolStripDropDownItem
currentSelected)
953
if (MenuItem.DropDownItems[index] is
ToolStripDropDownItem
newItem)
965
ToolStripDropDownItem
currentItem = MenuItem;
968
currentItem = (
ToolStripDropDownItem
)dropDown.OwnerItem;
1109
ToolStripDropDownItem
ddi = sender as
ToolStripDropDownItem
;
1121
ToolStripDropDownItem
ddi = sender as
ToolStripDropDownItem
;
1143
if (sender is
ToolStripDropDownItem
ddi)
1253
ToolStripDropDownItem
selectedItem = null;
1258
selectedItem = ((ToolStripDropDown)item.Owner).OwnerItem as
ToolStripDropDownItem
;
1263
selectedItem = _selectionService.PrimarySelection as
ToolStripDropDownItem
;
1372
ToolStripDropDownItem
dropDownItem = toolItem as
ToolStripDropDownItem
;
1424
private void HideAllDropDowns(
ToolStripDropDownItem
item)
1440
item = (
ToolStripDropDownItem
)itemDropDown.OwnerItem;
1457
private void HideSiblingDropDowns(
ToolStripDropDownItem
item)
1467
item = (
ToolStripDropDownItem
)dropDown.OwnerItem;
1541
internal void InitializeBodyGlyphsForItems(bool addGlyphs /* true for add */,
ToolStripDropDownItem
item)
1576
if (MenuItem.DropDown.OwnerItem is
ToolStripDropDownItem
currentOwner && currentOwner != MenuItem)
1625
if (startDropDown.OwnerItem is
ToolStripDropDownItem
ownerItem)
1882
ToolStripDropDownItem
ownerItem = (
ToolStripDropDownItem
)owner.OwnerItem;
1965
ToolStripDropDownItem
ownerItem = (
ToolStripDropDownItem
)owner.OwnerItem;
1972
if (itemToBeDeleted is
ToolStripDropDownItem
dropDownItem)
2312
internal void RemoveTypeHereNode(
ToolStripDropDownItem
ownerItem)
2347
ToolStripDropDownItem
editedItem = (
ToolStripDropDownItem
)MenuItem.DropDownItems[index + 1];
2372
private void RemoveBodyGlyphs(
ToolStripDropDownItem
item)
2415
internal void ResetGlyphs(
ToolStripDropDownItem
item)
2534
private void SelectItems(
ToolStripDropDownItem
oldSelection, ISelectionService selSvc)
2554
internal void ShowOwnerDropDown(
ToolStripDropDownItem
currentSelection)
2561
currentSelection = (
ToolStripDropDownItem
)currentDropDown.OwnerItem;
2684
ToolStripDropDownItem
ownerItem = null;
2687
ownerItem = parentToolStrip.OwnerItem as
ToolStripDropDownItem
;
2762
if (primaryItem is
ToolStripDropDownItem
dropDownItem)
System\Windows\Forms\Design\ToolStripTemplateNode.cs (11)
694
if (_component is
ToolStripDropDownItem
stripItem)
888
if (_activeItem is
ToolStripDropDownItem
item && !item.IsOnDropDown)
1230
ToolStripDropDownItem
stripItem = sender as
ToolStripDropDownItem
;
1344
if (_component is
ToolStripDropDownItem
stripItem)
1377
if (currentItem is
ToolStripDropDownItem
)
1481
if (currentItem is
ToolStripDropDownItem
stripItem)
1498
if (currentItem is MenuStrip or
ToolStripDropDownItem
)
1681
if (_currentItem is
ToolStripDropDownItem
)
1738
if (_currentItem is
ToolStripDropDownItem
)
1854
if (_owner._component is MenuStrip or
ToolStripDropDownItem
)
System.Windows.Forms.Tests (37)
System\Windows\Forms\AccessibleObjects\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObjectTests.cs (31)
12
IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<
ToolStripDropDownItem
>().Select(type => type);
33
using
ToolStripDropDownItem
item = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(itemType);
79
IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<
ToolStripDropDownItem
>().Select(type => type);
108
using
ToolStripDropDownItem
ownerItem = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(ownerType);
109
using
ToolStripDropDownItem
parentItem1 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(parentType);
110
using
ToolStripDropDownItem
parentItem2 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(parentType);
111
using
ToolStripDropDownItem
childItem1 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
112
using
ToolStripDropDownItem
childItem2 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
113
using
ToolStripDropDownItem
childItem3 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
114
using
ToolStripDropDownItem
childItem4 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
171
IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<
ToolStripDropDownItem
>().Select(type => type);
193
using
ToolStripDropDownItem
parentItem1 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(parentType);
194
using
ToolStripDropDownItem
parentItem2 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(parentType);
195
using
ToolStripDropDownItem
childItem1 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
196
using
ToolStripDropDownItem
childItem2 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
197
using
ToolStripDropDownItem
childItem3 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
198
using
ToolStripDropDownItem
childItem4 = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(childType);
System\Windows\Forms\AccessibleObjects\ToolStripScrollButton.ToolStripScrollButtonAccessibleObjectTests.cs (6)
12
IEnumerable<Type> types = ReflectionHelper.GetPublicNotAbstractClasses<
ToolStripDropDownItem
>().Select(type => type);
33
using
ToolStripDropDownItem
ownerItem = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(itemType);
95
using
ToolStripDropDownItem
ownerItem = ReflectionHelper.InvokePublicConstructor<
ToolStripDropDownItem
>(itemType);
133
using
ToolStripDropDownItem
ownerItem = new ToolStripDropDownButton();