4 types derived from MenuStrip
System.Windows.Forms (2)
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
12internal partial class MdiControlStrip : MenuStrip
System\Windows\Forms\MDI\MdiWindowListStrip.cs (1)
9internal class MdiWindowListStrip : MenuStrip
System.Windows.Forms.Tests (2)
System\Windows\Forms\MenuStripTests.cs (1)
834private class SubMenuStrip : MenuStrip
System\Windows\Forms\ToolStripItemTests.cs (1)
15434private class MyMenuStrip : MenuStrip
39 instantiations of MenuStrip
Accessibility_Core_App (2)
Menu_Toolbars_controls.Designer.cs (1)
36menuStrip1 = new MenuStrip();
ToolStripContainer.Designer.cs (1)
56this.menuStrip1 = new System.Windows.Forms.MenuStrip();
DesignSurface (3)
MainForm.cs (2)
299MenuStrip menuStrip1 = new(); 300MenuStrip menuStrip2 = new();
MainForm.Designer.cs (1)
43this.menuStrip1 = new System.Windows.Forms.MenuStrip();
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
379_designMenu = new MenuStrip
System.Windows.Forms.Tests (28)
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (10)
15using MenuStrip menuStrip = new() 30using MenuStrip menuStrip = new(); 40using MenuStrip menuStrip = new(); 50using MenuStrip menuStrip = new(); 61using MenuStrip menuStrip = new() 75using MenuStrip menuStrip = new() 89using MenuStrip menuStrip = new(); 101using MenuStrip menuStrip = new(); 129using MenuStrip menuStrip = new(); 906MenuStrip menuStrip = new();
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (2)
130using MenuStrip menuStrip = new(); 170using MenuStrip menuStrip = new();
System\Windows\Forms\FormTests.cs (1)
1230using MenuStrip menuStrip = new();
System\Windows\Forms\MdiControlStripTests.cs (4)
200using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 246using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 291using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 317using MenuStrip menuStrip = new();
System\Windows\Forms\MenuStripTests.cs (7)
156using MenuStrip control = new(); 183using MenuStrip control = new(); 242using MenuStrip control = new(); 269using MenuStrip control = new(); 314using MenuStrip control = new() 331using MenuStrip control = new() 376using MenuStrip control = new();
System\Windows\Forms\ToolStripRenderEventArgsTests.cs (2)
32yield return new object[] { new MenuStrip(), new Rectangle(0, 0, 200, 24), SystemColors.MenuBar }; 55yield return new object[] { new MenuStrip(), new Rectangle(1, 2, 3, 4), Color.Empty, SystemColors.MenuBar };
System\Windows\Forms\ToolStripTests.cs (2)
7311using MenuStrip menuStrip = new(); 7322using MenuStrip menuStrip = new();
System.Windows.Forms.UI.IntegrationTests (2)
MenuStripTests.cs (1)
15using MenuStrip menuStrip = new() { TabStop = value };
ToolStripTests.cs (1)
78using MenuStrip menuStrip = new();
WinFormsControlsTest (3)
MdiChild.cs (1)
15_menuStrip = new MenuStrip();
MdiParent.cs (1)
30_menuStrip = new MenuStrip();
MenuStripAndCheckedListBox.Designer.cs (1)
34this.menuStrip1 = new System.Windows.Forms.MenuStrip();
121 references to MenuStrip
Accessibility_Core_App (2)
Menu_Toolbars_controls.Designer.cs (1)
615private MenuStrip menuStrip1;
ToolStripContainer.Designer.cs (1)
629private System.Windows.Forms.MenuStrip menuStrip1;
DesignSurface (3)
MainForm.cs (2)
299MenuStrip menuStrip1 = new(); 300MenuStrip menuStrip2 = new();
MainForm.Designer.cs (1)
320private System.Windows.Forms.MenuStrip menuStrip1;
System.Windows.Forms (25)
System\Windows\Forms\Controls\Menus\MenuStrip.MenuStripAccessibleObject.cs (1)
13public MenuStripAccessibleObject(MenuStrip owner)
System\Windows\Forms\Controls\ToolStrips\ToolStripHighContrastRenderer.cs (1)
271else if (e.ToolStrip is MenuStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.cs (5)
900MenuStrip? menuStripToActivate = null; 967internal static MenuStrip? GetMainMenuStrip(Control control) 986private static MenuStrip? GetFirstMenuStripRecursive(Control.ControlCollection controlsToLookIn) 999if (controlsToLookIn[i] is MenuStrip menuStrip) 1016MenuStrip? menuStrip = GetFirstMenuStripRecursive(controlsToLookIn[i].Controls);
System\Windows\Forms\Controls\ToolStrips\ToolStripProfessionalLowResolutionRenderer.cs (1)
33if (e.ToolStrip is MenuStrip)
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (5)
129else if (toolStrip is MenuStrip) 408else if (toolStrip is MenuStrip) 496int yOffset = (toolStrip is MenuStrip) ? 2 : 0; 836if (toolStrip is ToolStripDropDown or MenuStrip or StatusStrip) 1220bool drawCurve = RoundedEdges && (item?.GetCurrentParent() is not MenuStrip);
System\Windows\Forms\Controls\ToolStrips\ToolStripRenderEventArgs.cs (1)
79else if (ToolStrip is MenuStrip)
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (1)
213else if (toolStrip is MenuStrip)
System\Windows\Forms\Form.cs (6)
1262public MenuStrip? MainMenuStrip 1264get => Properties.GetValueOrDefault<MenuStrip>(s_propMainMenuStrip); 6084MenuStrip? mainMenuStrip = MainMenuStrip; 6150Type[] stockTypes = [typeof(MenuStrip)]; 6257MenuStrip? sourceMenuStrip = ToolStripManager.GetMainMenuStrip(this); 6282MenuStrip? sourceMenuStrip = ToolStripManager.GetMainMenuStrip(this);
System\Windows\Forms\MDI\MDIControlStrip.cs (1)
76internal MenuStrip? MergedMenu { get; set; }
System\Windows\Forms\MDI\MdiWindowListItemConverter.cs (1)
20if (context?.Instance is MenuStrip menu)
System\Windows\Forms\MDI\MdiWindowListStrip.cs (2)
13private MenuStrip? _mergedMenu; 47internal MenuStrip? MergedMenu
System.Windows.Forms.Design (23)
System\Windows\Forms\Design\Behavior\ToolStripPanelSelectionBehavior.cs (1)
271|| item.GetType(host) == typeof(MenuStrip)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
49if (_designer.Component is MenuStrip menuStrip) 67private void CreateStandardMenuStrip(IDesignerHost host, MenuStrip tool)
System\Windows\Forms\Design\ToolStripDesigner.cs (8)
1491if (parentPanel is null || ToolStrip is MenuStrip) 1499if (ToolStrip is MenuStrip) 1504mainMenuStripProperty.SetValue(parentForm, ToolStrip as MenuStrip); 1511if (ToolStrip is not MenuStrip) 1532if (ToolStrip is MenuStrip) 1560MenuStrip menu = c as MenuStrip; 2422if (ToolStrip is MenuStrip)
System\Windows\Forms\Design\ToolStripDesignerUtils.cs (2)
194if (toolStrip is MenuStrip) 219else if (toolStrip is MenuStrip)
System\Windows\Forms\Design\ToolStripDropDownDesigner.cs (1)
21private MenuStrip _designMenu;
System\Windows\Forms\Design\ToolStripInSituService.cs (2)
118if (c.GetCurrentParent() is MenuStrip tool) 145else if (comp is MenuStrip)
System\Windows\Forms\Design\ToolStripItemCustomMenuItemCollection.cs (2)
342if (ParentTool is MenuStrip parent) 432private void InsertIntoMainMenu(MenuStrip parent, Type t)
System\Windows\Forms\Design\ToolStripItemDesigner.cs (1)
338if (immediateParent is MenuStrip
System\Windows\Forms\Design\ToolStripTemplateNode.cs (4)
439if (parent is MenuStrip) 1498if (currentItem is MenuStrip or ToolStripDropDownItem) 1742else if (_currentItem is MenuStrip) 1854if (_owner._component is MenuStrip or ToolStripDropDownItem)
System.Windows.Forms.Tests (62)
System\Windows\Forms\AccessibleObjects\MenuStrip.MenuStripAccessibleObjectTests.cs (46)
15using MenuStrip menuStrip = new() 30using MenuStrip menuStrip = new(); 40using MenuStrip menuStrip = new(); 50using MenuStrip menuStrip = new(); 61using MenuStrip menuStrip = new() 75using MenuStrip menuStrip = new() 89using MenuStrip menuStrip = new(); 101using MenuStrip menuStrip = new(); 129using MenuStrip menuStrip = new(); 153using MenuStrip menuStrip = CreateMenuStrip(itemCount: 1, createControl: false); 164using MenuStrip menuStrip = CreateMenuStrip(); 173using MenuStrip menuStrip = CreateMenuStrip(); 230using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 242using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 269using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 1); 281using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 304using MenuStrip menuStrip = CreateMenuStrip(ToolStripGripStyle.Hidden, layout, dock, size, canOverflow: true, itemCount: 1); 327using MenuStrip menuStrip = CreateMenuStrip(ToolStripGripStyle.Hidden, layout, dock, size, canOverflow: false, itemCount: 3); 348using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock: null, size, canOverflow: false, itemCount: 3); 360using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 1); 376using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 392using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 408using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 424using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 442using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 460using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 477using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 539using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 551using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 562using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 574using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 1); 590using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 606using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 0); 623using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 639using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 655using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 677using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 699using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 716using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow, itemCount: 2); 747using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow: true, itemCount: 3); 786using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow: false, itemCount: 3); 825using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow: false, itemCount: 2); 861using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow: false, itemCount: 3); 886using MenuStrip menuStrip = CreateMenuStrip(grip, layout, dock, size, canOverflow: false, itemCount: 3); 896private MenuStrip CreateMenuStrip( 906MenuStrip menuStrip = new();
System\Windows\Forms\AccessibleObjects\ToolStripMenuItem.ToolStripMenuItemAccessibleObjectTests.cs (2)
130using MenuStrip menuStrip = new(); 170using MenuStrip menuStrip = new();
System\Windows\Forms\FormTests.cs (1)
1230using MenuStrip menuStrip = new();
System\Windows\Forms\MdiControlStripTests.cs (4)
200using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 246using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 291using MenuStrip menuStrip = new() { RightToLeft = rightToLeft }; 317using MenuStrip menuStrip = new();
System\Windows\Forms\MenuStripTests.cs (7)
156using MenuStrip control = new(); 183using MenuStrip control = new(); 242using MenuStrip control = new(); 269using MenuStrip control = new(); 314using MenuStrip control = new() 331using MenuStrip control = new() 376using MenuStrip control = new();
System\Windows\Forms\ToolStripTests.cs (2)
7311using MenuStrip menuStrip = new(); 7322using MenuStrip menuStrip = new();
System.Windows.Forms.UI.IntegrationTests (2)
MenuStripTests.cs (1)
15using MenuStrip menuStrip = new() { TabStop = value };
ToolStripTests.cs (1)
78using MenuStrip menuStrip = new();
WinFormsControlsTest (4)
MdiChild.cs (1)
9private readonly MenuStrip _menuStrip;
MdiParent.cs (2)
11private readonly MenuStrip _menuStrip; 44public MenuStrip MainMenu => _menuStrip;
MenuStripAndCheckedListBox.Designer.cs (1)
303private System.Windows.Forms.MenuStrip menuStrip1;