135 references to ToolStripManager
System.Windows.Forms (123)
System\Windows\Forms\ContextMenuStrip.cs (1)
89ToolStripManager.ModalMenuFilter.Instance.ShowUnderlines = true;
System\Windows\Forms\Control.cs (1)
12255if ((m.WParamInternal & 0xFFF0) == PInvoke.SC_KEYMENU && ToolStripManager.ProcessMenuKey(ref m))
System\Windows\Forms\Controls\Menus\MenuStrip.cs (3)
204ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this, menuKeyPressed: true); 227if (ToolStripManager.ModalMenuFilter.InMenuMode) 237ToolStripManager.ModalMenuFilter.ExitMenuMode();
System\Windows\Forms\Controls\Menus\MenuTimer.cs (1)
168if (CurrentItem is not null && !CurrentItem.IsDisposed && CurrentItem.Selected && CurrentItem.Enabled && ToolStripManager.ModalMenuFilter.InMenuMode)
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1)
44else if (ToolStripManager.VisualStylesEnabled)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (34)
116ToolStripManager.CurrentDpi = DeviceDpi; 117_defaultFont = ToolStripManager.DefaultFont; 145ToolStripManager.ToolStrips.Add(this); 529_defaultFont ??= ToolStripManager.DefaultFont; 777return (ContainsFocus || (ToolStripManager.ModalMenuFilter.InMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this)); 1308if (!IsDropDown && !ToolStripManager.ModalMenuFilter.InMenuMode) 1506return ToolStripManager.Renderer; 1515_renderer = ToolStripManager.CreateRenderer(RenderMode); 1560return _currentRendererType == ToolStripManager.s_professionalRendererType 1562: _currentRendererType == ToolStripManager.s_systemRendererType 1586Renderer = ToolStripManager.CreateRenderer(value); 1934if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this) 1939ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1941if (exitMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() is null) 1943ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1946ToolStripManager.ToolStrips.Remove(this); 2489ToolStripManager.RendererChanged += OnDefaultRendererChanged; 2502ToolStripManager.RendererChanged -= OnDefaultRendererChanged; 2678if (ToolStripManager.IsMenuKey(keyData)) 2680if (!IsDropDown && ToolStripManager.ModalMenuFilter.InMenuMode) 2683ToolStripManager.ModalMenuFilter.MenuKeyToggle = true; 2684ToolStripManager.ModalMenuFilter.ExitMenuMode(); 2720&& ToolStripManager.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.None)) 2848bool inMenuMode = ToolStripManager.ModalMenuFilter.InMenuMode; 2855else if (inMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this) 3156ToolStripManager.CurrentDpi = DeviceDpi; 3157_defaultFont = ToolStripManager.DefaultFont; 3731ToolStripManager.CurrentDpi = deviceDpiNew; 3732_defaultFont = ToolStripManager.DefaultFont; 3954if (wasInMenuMode == ToolStripManager.ModalMenuFilter.InMenuMode) 3965ToolStripManager.ModalMenuFilter.MenuKeyToggle = false; 3969ToolStripManager.ModalMenuFilter.ExitMenuMode(); 4163ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this, menuKeyPressed: false);
System\Windows\Forms\Controls\ToolStrips\ToolStrip.RestoreFocusMessageFilter.cs (1)
57_ownerToolStrip.BeginInvoke(new BooleanMethodInvoker(_ownerToolStrip.RestoreFocusInternal), [ToolStripManager.ModalMenuFilter.InMenuMode]);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.cs (4)
48Font = ToolStripManager.DefaultFont 365ToolStripManager.ModalMenuFilter.SuspendMenuMode(); 378ToolStripManager.ModalMenuFilter.ResumeMenuMode(); 443return !Equals(Font, ToolStripManager.DefaultFont);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
76if (!comboBox.Enabled || !ToolStripManager.VisualStylesEnabled) 133&& ToolStripManager.VisualStylesEnabled
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (20)
964if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() is null) 966ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1259if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != OwnerToolStrip) 1261ToolStripManager.ModalMenuFilter.SetActiveToolStrip(OwnerToolStrip); 1271ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1278ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1334if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != toplevelToolStrip) 1336ToolStripManager.ModalMenuFilter.SetActiveToolStrip(toplevelToolStrip); 1358if (AutoClose && Visible & ToolStripManager.IsMenuKey(keyData)) 1366ToolStripManager.ModalMenuFilter.MenuKeyToggle = true; 1369ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1433ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); 1434PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1700ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1701ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1705ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1777ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1911if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != this) 1914ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); 1985HandleRef<HWND> activeWindow = ToolStripManager.ModalMenuFilter.ActiveHwnd;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
136ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked); 160ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
247ToolStripManager.VisualStylesEnabled ? LogicalGripThicknessVisualStylesEnabled : LogicalGripThickness,
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (5)
145internal Font _defaultFont = ToolStripManager.DefaultFont; 919return ScaleHelper.IsThreadPerMonitorV2Aware ? _defaultFont : ToolStripManager.DefaultFont; 1794=> DesignMode || ToolStripManager.ShowMenuFocusCues; 3105ToolStripManager.CurrentDpi = newDpi; 3106_defaultFont = ToolStripManager.DefaultFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
24/// This is not part of <see cref="ToolStripManager"/> because it is DropDown specific and
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (4)
362if ((value != Keys.None) && !ToolStripManager.IsValidShortcut(value)) 891ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked); 960else if (!IsTopLevel || (ToolStripManager.VisualStylesEnabled)) 1122return ToolStripManager.ModalMenuFilter.InMenuMode;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
48ToolStripManager.ToolStripPanels.Add(this); 396ToolStripManager.ToolStripPanels.Remove(this); 986ToolStripPanel? panel = ToolStripManager.ToolStripPanelFromPoint(toolStripToDrag, screenLocation);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
107get { return (ColorTable.UseSystemColors || !ToolStripManager.VisualStylesEnabled); }
System\Windows\Forms\Controls\ToolStrips\ToolStripRendererSwitcher.cs (8)
45return ToolStripManager.Renderer; 54Renderer = ToolStripManager.CreateRenderer(RenderMode); 90if (_currentRendererType == ToolStripManager.s_professionalRendererType) 95if (_currentRendererType == ToolStripManager.s_systemRendererType) 122Renderer = ToolStripManager.CreateRenderer(value); 146ToolStripManager.RendererChanged -= OnDefaultRendererChanged; 159ToolStripManager.RendererChanged += OnDefaultRendererChanged; 167ToolStripManager.RendererChanged -= OnDefaultRendererChanged;
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (2)
116ToolStrip? toolStrip = ToolStripManager.FindToolStrip(_form, toolStripSettings.Name); 161ToolStrip? toolStrip = ToolStripManager.FindToolStrip(_form, settings.Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
459ToolStripManager.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (14)
210FillBackground(g, bounds, (!ToolStripManager.VisualStylesEnabled) ? 215FillBackground(g, bounds, (!ToolStripManager.VisualStylesEnabled) ? 218else if (ToolStripManager.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Band.Normal)) 226FillBackground(g, bounds, (!ToolStripManager.VisualStylesEnabled) ? 247if (toolStripDropDown.DropShadowEnabled && ToolStripManager.VisualStylesEnabled) 260if (ToolStripManager.VisualStylesEnabled) 282if (ToolStripManager.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Gripper.Normal)) 383if (ToolStripManager.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Chevron.Normal)) 422if (item.IsTopLevel && !ToolStripManager.VisualStylesEnabled) 461Color borderColor = ToolStripManager.VisualStylesEnabled 475else if (!ToolStripManager.VisualStylesEnabled && (item.RawBackColor != Color.Empty)) 532if (ToolStripManager.VisualStylesEnabled 651if (ToolStripManager.VisualStylesEnabled 695if (ToolStripManager.VisualStylesEnabled
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
158return Font != ToolStripManager.DefaultFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
21Font = ToolStripManager.DefaultFont; 195Font = ToolStripManager.DefaultFont;
System\Windows\Forms\Form.cs (9)
6171List<ToolStrip> childrenToolStrips = ToolStripManager.FindMergeableToolStrips(ActiveMdiChildInternal); 6176ToolStripManager.RevertMerge(thisToolstrip); 6196ToolStripManager.Merge(sourceToolStrip, thisToolstrip); 6234ToolStripManager.RevertMergeInternal(mdiControlStrip.MergedMenu, mdiControlStrip, revertMDIControls: true); 6257MenuStrip? sourceMenuStrip = ToolStripManager.GetMainMenuStrip(this); 6261ToolStripManager.Merge(MdiControlStrip, sourceMenuStrip); 6279ToolStripManager.RevertMergeInternal(MdiWindowListStrip.MergedMenu, MdiWindowListStrip, revertMDIControls: true); 6282MenuStrip? sourceMenuStrip = ToolStripManager.GetMainMenuStrip(this); 6291ToolStripManager.Merge(MdiWindowListStrip, sourceMenuStrip);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1238return ToolStripManager.ProcessCmdKey(ref msg, keyData);
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
160if (!ToolStripManager.IsShortcutDefined(shortcut) && ToolStripManager.IsValidShortcut(shortcut))
System.Windows.Forms.Tests (10)
System\Windows\Forms\ProfessionalColorsTests.cs (3)
83bool oldValue = ToolStripManager.VisualStylesEnabled; 86ToolStripManager.VisualStylesEnabled = true; 93ToolStripManager.VisualStylesEnabled = oldValue;
System\Windows\Forms\ProfessionalColorTableTests.cs (3)
106bool oldValue = ToolStripManager.VisualStylesEnabled; 109ToolStripManager.VisualStylesEnabled = true; 117ToolStripManager.VisualStylesEnabled = oldValue;
System\Windows\Forms\ToolStripTests.cs (3)
1656Assert.Equal(ToolStripManager.DefaultFont, toolStrip1.Font); 1657Assert.Equal(ToolStripManager.DefaultFont, item1.Font); 1658Assert.Equal(ToolStripManager.DefaultFont, item2.Font);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
184_toolStripTextBox.Font = ToolStripManager.DefaultFont;