135 references to ToolStripManager
System.Windows.Forms (123)
System\Windows\Forms\ContextMenuStrip.cs (1)
89
ToolStripManager
.ModalMenuFilter.Instance.ShowUnderlines = true;
System\Windows\Forms\Control.cs (1)
12223
if ((m.WParamInternal & 0xFFF0) == PInvoke.SC_KEYMENU &&
ToolStripManager
.ProcessMenuKey(ref m))
System\Windows\Forms\Controls\Menus\MenuStrip.cs (3)
204
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(this, menuKeyPressed: true);
227
if (
ToolStripManager
.ModalMenuFilter.InMenuMode)
237
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
System\Windows\Forms\Controls\Menus\MenuTimer.cs (1)
168
if (CurrentItem is not null && !CurrentItem.IsDisposed && CurrentItem.Selected && CurrentItem.Enabled &&
ToolStripManager
.ModalMenuFilter.InMenuMode)
System\Windows\Forms\Controls\ToolStrips\ProfessionalColorTable.cs (1)
44
else if (
ToolStripManager
.VisualStylesEnabled)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (34)
116
ToolStripManager
.CurrentDpi = DeviceDpi;
117
_defaultFont =
ToolStripManager
.DefaultFont;
145
ToolStripManager
.ToolStrips.Add(this);
530
_defaultFont ??=
ToolStripManager
.DefaultFont;
779
return (ContainsFocus || (
ToolStripManager
.ModalMenuFilter.InMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this));
1310
if (!IsDropDown && !
ToolStripManager
.ModalMenuFilter.InMenuMode)
1508
return
ToolStripManager
.Renderer;
1517
_renderer =
ToolStripManager
.CreateRenderer(RenderMode);
1562
return _currentRendererType ==
ToolStripManager
.s_professionalRendererType
1564
: _currentRendererType ==
ToolStripManager
.s_systemRendererType
1588
Renderer =
ToolStripManager
.CreateRenderer(value);
1936
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this)
1941
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1943
if (exitMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() is null)
1945
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1948
ToolStripManager
.ToolStrips.Remove(this);
2491
ToolStripManager
.RendererChanged += OnDefaultRendererChanged;
2504
ToolStripManager
.RendererChanged -= OnDefaultRendererChanged;
2680
if (
ToolStripManager
.IsMenuKey(keyData))
2682
if (!IsDropDown &&
ToolStripManager
.ModalMenuFilter.InMenuMode)
2685
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = true;
2686
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
2722
&&
ToolStripManager
.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.None))
2850
bool inMenuMode =
ToolStripManager
.ModalMenuFilter.InMenuMode;
2857
else if (inMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this)
3158
ToolStripManager
.CurrentDpi = DeviceDpi;
3159
_defaultFont =
ToolStripManager
.DefaultFont;
3733
ToolStripManager
.CurrentDpi = deviceDpiNew;
3734
_defaultFont =
ToolStripManager
.DefaultFont;
3956
if (wasInMenuMode ==
ToolStripManager
.ModalMenuFilter.InMenuMode)
3967
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = false;
3971
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
4165
ToolStripManager
.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)
48
Font =
ToolStripManager
.DefaultFont
365
ToolStripManager
.ModalMenuFilter.SuspendMenuMode();
378
ToolStripManager
.ModalMenuFilter.ResumeMenuMode();
443
return !Equals(Font,
ToolStripManager
.DefaultFont);
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxFlatComboAdapter.cs (2)
76
if (!comboBox.Enabled || !
ToolStripManager
.VisualStylesEnabled)
133
&&
ToolStripManager
.VisualStylesEnabled
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.cs (20)
964
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() is null)
966
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1262
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != OwnerToolStrip)
1264
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(OwnerToolStrip);
1274
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1281
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1337
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != toplevelToolStrip)
1339
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(toplevelToolStrip);
1361
if (AutoClose && Visible &
ToolStripManager
.IsMenuKey(keyData))
1369
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = true;
1372
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1436
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(this);
1437
PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT,
ToolStripManager
.ModalMenuFilter.ActiveHwnd);
1703
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1704
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1708
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1780
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1914
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != this)
1917
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(this);
1988
HandleRef<HWND> activeWindow =
ToolStripManager
.ModalMenuFilter.ActiveHwnd;
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownButton.cs (2)
136
ToolStripManager
.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
160
ToolStripManager
.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripGrip.cs (1)
247
ToolStripManager
.VisualStylesEnabled ? LogicalGripThicknessVisualStylesEnabled : LogicalGripThickness,
System\Windows\Forms\Controls\ToolStrips\ToolStripItem.cs (5)
145
internal Font _defaultFont =
ToolStripManager
.DefaultFont;
919
return ScaleHelper.IsThreadPerMonitorV2Aware ? _defaultFont :
ToolStripManager
.DefaultFont;
1802
=> DesignMode ||
ToolStripManager
.ShowMenuFocusCues;
3113
ToolStripManager
.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)
362
if ((value != Keys.None) && !
ToolStripManager
.IsValidShortcut(value))
891
ToolStripManager
.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
960
else if (!IsTopLevel || (
ToolStripManager
.VisualStylesEnabled))
1122
return
ToolStripManager
.ModalMenuFilter.InMenuMode;
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.cs (3)
48
ToolStripManager
.ToolStripPanels.Add(this);
396
ToolStripManager
.ToolStripPanels.Remove(this);
994
ToolStripPanel? panel =
ToolStripManager
.ToolStripPanelFromPoint(toolStripToDrag, screenLocation);
System\Windows\Forms\Controls\ToolStrips\ToolstripProfessionalRenderer.cs (1)
107
get { return (ColorTable.UseSystemColors || !
ToolStripManager
.VisualStylesEnabled); }
System\Windows\Forms\Controls\ToolStrips\ToolStripRendererSwitcher.cs (8)
45
return
ToolStripManager
.Renderer;
54
Renderer =
ToolStripManager
.CreateRenderer(RenderMode);
90
if (_currentRendererType ==
ToolStripManager
.s_professionalRendererType)
95
if (_currentRendererType ==
ToolStripManager
.s_systemRendererType)
122
Renderer =
ToolStripManager
.CreateRenderer(value);
146
ToolStripManager
.RendererChanged -= OnDefaultRendererChanged;
159
ToolStripManager
.RendererChanged += OnDefaultRendererChanged;
167
ToolStripManager
.RendererChanged -= OnDefaultRendererChanged;
System\Windows\Forms\Controls\ToolStrips\ToolStripSettingsManager.cs (2)
116
ToolStrip? toolStrip =
ToolStripManager
.FindToolStrip(_form, toolStripSettings.Name);
161
ToolStrip? toolStrip =
ToolStripManager
.FindToolStrip(_form, settings.Name);
System\Windows\Forms\Controls\ToolStrips\ToolStripSplitButton.cs (1)
459
ToolStripManager
.ModalMenuFilter.CloseActiveDropDown(DropDown, ToolStripDropDownCloseReason.AppClicked);
System\Windows\Forms\Controls\ToolStrips\ToolStripSystemRenderer.cs (14)
210
FillBackground(g, bounds, (!
ToolStripManager
.VisualStylesEnabled) ?
215
FillBackground(g, bounds, (!
ToolStripManager
.VisualStylesEnabled) ?
218
else if (
ToolStripManager
.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Band.Normal))
226
FillBackground(g, bounds, (!
ToolStripManager
.VisualStylesEnabled) ?
247
if (toolStripDropDown.DropShadowEnabled &&
ToolStripManager
.VisualStylesEnabled)
260
if (
ToolStripManager
.VisualStylesEnabled)
282
if (
ToolStripManager
.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Gripper.Normal))
383
if (
ToolStripManager
.VisualStylesEnabled && VisualStyleRenderer.IsElementDefined(VisualStyleElement.Rebar.Chevron.Normal))
422
if (item.IsTopLevel && !
ToolStripManager
.VisualStylesEnabled)
461
Color borderColor =
ToolStripManager
.VisualStylesEnabled
475
else if (!
ToolStripManager
.VisualStylesEnabled && (item.RawBackColor != Color.Empty))
532
if (
ToolStripManager
.VisualStylesEnabled
651
if (
ToolStripManager
.VisualStylesEnabled
695
if (
ToolStripManager
.VisualStylesEnabled
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.cs (1)
158
return Font !=
ToolStripManager
.DefaultFont;
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControl.cs (2)
21
Font =
ToolStripManager
.DefaultFont;
195
Font =
ToolStripManager
.DefaultFont;
System\Windows\Forms\Form.cs (9)
6171
List<ToolStrip> childrenToolStrips =
ToolStripManager
.FindMergeableToolStrips(ActiveMdiChildInternal);
6176
ToolStripManager
.RevertMerge(thisToolstrip);
6196
ToolStripManager
.Merge(sourceToolStrip, thisToolstrip);
6234
ToolStripManager
.RevertMergeInternal(mdiControlStrip.MergedMenu, mdiControlStrip, revertMDIControls: true);
6257
MenuStrip? sourceMenuStrip =
ToolStripManager
.GetMainMenuStrip(this);
6261
ToolStripManager
.Merge(MdiControlStrip, sourceMenuStrip);
6279
ToolStripManager
.RevertMergeInternal(MdiWindowListStrip.MergedMenu, MdiWindowListStrip, revertMDIControls: true);
6282
MenuStrip? sourceMenuStrip =
ToolStripManager
.GetMainMenuStrip(this);
6291
ToolStripManager
.Merge(MdiWindowListStrip, sourceMenuStrip);
System\Windows\Forms\Layout\Containers\ContainerControl.cs (1)
1238
return
ToolStripManager
.ProcessCmdKey(ref msg, keyData);
System.Windows.Forms.Design (2)
System\Windows\Forms\Design\StandardMenuStripVerb.cs (2)
160
if (!
ToolStripManager
.IsShortcutDefined(shortcut) &&
ToolStripManager
.IsValidShortcut(shortcut))
System.Windows.Forms.Tests (10)
System\Windows\Forms\ProfessionalColorsTests.cs (3)
83
bool oldValue =
ToolStripManager
.VisualStylesEnabled;
86
ToolStripManager
.VisualStylesEnabled = true;
93
ToolStripManager
.VisualStylesEnabled = oldValue;
System\Windows\Forms\ProfessionalColorTableTests.cs (3)
106
bool oldValue =
ToolStripManager
.VisualStylesEnabled;
109
ToolStripManager
.VisualStylesEnabled = true;
117
ToolStripManager
.VisualStylesEnabled = oldValue;
System\Windows\Forms\ToolStripTests.cs (3)
1656
Assert.Equal(
ToolStripManager
.DefaultFont, toolStrip1.Font);
1657
Assert.Equal(
ToolStripManager
.DefaultFont, item1.Font);
1658
Assert.Equal(
ToolStripManager
.DefaultFont, item2.Font);
System\Windows\Forms\ToolStripTextBoxTests.cs (1)
184
_toolStripTextBox.Font =
ToolStripManager
.DefaultFont;