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)
12223if ((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); 530_defaultFont ??= ToolStripManager.DefaultFont; 779return (ContainsFocus || (ToolStripManager.ModalMenuFilter.InMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this)); 1310if (!IsDropDown && !ToolStripManager.ModalMenuFilter.InMenuMode) 1508return ToolStripManager.Renderer; 1517_renderer = ToolStripManager.CreateRenderer(RenderMode); 1562return _currentRendererType == ToolStripManager.s_professionalRendererType 1564: _currentRendererType == ToolStripManager.s_systemRendererType 1588Renderer = ToolStripManager.CreateRenderer(value); 1936if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this) 1941ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1943if (exitMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() is null) 1945ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1948ToolStripManager.ToolStrips.Remove(this); 2491ToolStripManager.RendererChanged += OnDefaultRendererChanged; 2504ToolStripManager.RendererChanged -= OnDefaultRendererChanged; 2680if (ToolStripManager.IsMenuKey(keyData)) 2682if (!IsDropDown && ToolStripManager.ModalMenuFilter.InMenuMode) 2685ToolStripManager.ModalMenuFilter.MenuKeyToggle = true; 2686ToolStripManager.ModalMenuFilter.ExitMenuMode(); 2722&& ToolStripManager.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.None)) 2850bool inMenuMode = ToolStripManager.ModalMenuFilter.InMenuMode; 2857else if (inMenuMode && ToolStripManager.ModalMenuFilter.GetActiveToolStrip() == this) 3158ToolStripManager.CurrentDpi = DeviceDpi; 3159_defaultFont = ToolStripManager.DefaultFont; 3733ToolStripManager.CurrentDpi = deviceDpiNew; 3734_defaultFont = ToolStripManager.DefaultFont; 3956if (wasInMenuMode == ToolStripManager.ModalMenuFilter.InMenuMode) 3967ToolStripManager.ModalMenuFilter.MenuKeyToggle = false; 3971ToolStripManager.ModalMenuFilter.ExitMenuMode(); 4165ToolStripManager.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(); 1262if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != OwnerToolStrip) 1264ToolStripManager.ModalMenuFilter.SetActiveToolStrip(OwnerToolStrip); 1274ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1281ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1337if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != toplevelToolStrip) 1339ToolStripManager.ModalMenuFilter.SetActiveToolStrip(toplevelToolStrip); 1361if (AutoClose && Visible & ToolStripManager.IsMenuKey(keyData)) 1369ToolStripManager.ModalMenuFilter.MenuKeyToggle = true; 1372ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1436ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); 1437PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT, ToolStripManager.ModalMenuFilter.ActiveHwnd); 1703ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1704ToolStripManager.ModalMenuFilter.ExitMenuMode(); 1708ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1780ToolStripManager.ModalMenuFilter.RemoveActiveToolStrip(this); 1914if (ToolStripManager.ModalMenuFilter.GetActiveToolStrip() != this) 1917ToolStripManager.ModalMenuFilter.SetActiveToolStrip(this); 1988HandleRef<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; 1802=> DesignMode || ToolStripManager.ShowMenuFocusCues; 3113ToolStripManager.CurrentDpi = newDpi; 3114_defaultFont = ToolStripManager.DefaultFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
26/// 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); 994ToolStripPanel? 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;