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)
12255
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);
529
_defaultFont ??=
ToolStripManager
.DefaultFont;
777
return (ContainsFocus || (
ToolStripManager
.ModalMenuFilter.InMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this));
1308
if (!IsDropDown && !
ToolStripManager
.ModalMenuFilter.InMenuMode)
1506
return
ToolStripManager
.Renderer;
1515
_renderer =
ToolStripManager
.CreateRenderer(RenderMode);
1560
return _currentRendererType ==
ToolStripManager
.s_professionalRendererType
1562
: _currentRendererType ==
ToolStripManager
.s_systemRendererType
1586
Renderer =
ToolStripManager
.CreateRenderer(value);
1934
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this)
1939
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1941
if (exitMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() is null)
1943
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1946
ToolStripManager
.ToolStrips.Remove(this);
2489
ToolStripManager
.RendererChanged += OnDefaultRendererChanged;
2502
ToolStripManager
.RendererChanged -= OnDefaultRendererChanged;
2678
if (
ToolStripManager
.IsMenuKey(keyData))
2680
if (!IsDropDown &&
ToolStripManager
.ModalMenuFilter.InMenuMode)
2683
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = true;
2684
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
2720
&&
ToolStripManager
.SelectNextToolStrip(this, forward: (keyData & Keys.Shift) == Keys.None))
2848
bool inMenuMode =
ToolStripManager
.ModalMenuFilter.InMenuMode;
2855
else if (inMenuMode &&
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() == this)
3156
ToolStripManager
.CurrentDpi = DeviceDpi;
3157
_defaultFont =
ToolStripManager
.DefaultFont;
3731
ToolStripManager
.CurrentDpi = deviceDpiNew;
3732
_defaultFont =
ToolStripManager
.DefaultFont;
3954
if (wasInMenuMode ==
ToolStripManager
.ModalMenuFilter.InMenuMode)
3965
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = false;
3969
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
4163
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();
1259
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != OwnerToolStrip)
1261
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(OwnerToolStrip);
1271
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1278
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1334
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != toplevelToolStrip)
1336
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(toplevelToolStrip);
1358
if (AutoClose && Visible &
ToolStripManager
.IsMenuKey(keyData))
1366
ToolStripManager
.ModalMenuFilter.MenuKeyToggle = true;
1369
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1433
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(this);
1434
PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT,
ToolStripManager
.ModalMenuFilter.ActiveHwnd);
1700
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1701
ToolStripManager
.ModalMenuFilter.ExitMenuMode();
1705
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1777
ToolStripManager
.ModalMenuFilter.RemoveActiveToolStrip(this);
1911
if (
ToolStripManager
.ModalMenuFilter.GetActiveToolStrip() != this)
1914
ToolStripManager
.ModalMenuFilter.SetActiveToolStrip(this);
1985
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;
1794
=> DesignMode ||
ToolStripManager
.ShowMenuFocusCues;
3105
ToolStripManager
.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)
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);
986
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;