2 types derived from MenuCommand
System.ComponentModel.TypeConverter (1)
System\ComponentModel\Design\DesignerVerb.cs (1)
12
public partial class DesignerVerb :
MenuCommand
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\CommandSet.CommandSetItem.cs (1)
19
protected partial class CommandSetItem :
MenuCommand
47 instantiations of MenuCommand
System.Windows.Forms.Design (47)
System\ComponentModel\Design\DesignerActionUI.cs (1)
95
_cmdShowDesignerActions = new
MenuCommand
(OnKeyShowDesignerActions, MenuCommands.KeyInvokeSmartTag);
System\Windows\Forms\Design\Behavior\DesignerActionKeyboardBehavior.cs (1)
43
MenuCommand dummyMC =
new
(delegate
System\Windows\Forms\Design\ComponentTray.cs (3)
105
_menucmdArrangeIcons = new
MenuCommand
(OnMenuArrangeIcons, StandardCommands.ArrangeIcons);
106
_menucmdLineupIcons = new
MenuCommand
(OnMenuLineupIcons, StandardCommands.LineupIcons);
107
_menucmdLargeIcons = new
MenuCommand
(OnMenuShowLargeIcons, StandardCommands.ShowLargeIcons);
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (4)
297
command = new
MenuCommand
(handler, StandardCommands.Copy)
307
command = new
MenuCommand
(handler, StandardCommands.Paste)
317
command = new
MenuCommand
(handler, StandardCommands.Delete)
327
command = new
MenuCommand
(handler, StandardCommands.Cut)
System\Windows\Forms\Design\TabOrder.cs (9)
81
new
(new EventHandler(OnKeyCancel),
84
new
(new EventHandler(OnKeyDefault),
87
new
(new EventHandler(OnKeyPrevious),
90
new
(new EventHandler(OnKeyNext),
93
new
(new EventHandler(OnKeyPrevious),
96
new
(new EventHandler(OnKeyNext),
99
new
(new EventHandler(OnKeyNext),
102
new
(new EventHandler(OnKeyPrevious),
108
new
(new EventHandler(OnKeyDefault),
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (28)
553
_newCommandPaste = new
MenuCommand
(new EventHandler(OnCommandPaste), StandardCommands.Paste);
1499
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeySelect), MenuCommands.KeySelectNext));
1500
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeySelect), MenuCommands.KeySelectPrevious));
1501
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyDefault), MenuCommands.KeyDefaultAction));
1502
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyEdit), MenuCommands.EditLabel));
1504
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyMoveUp));
1505
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyMoveDown));
1506
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyMoveLeft));
1507
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyMoveRight));
1509
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyNudgeUp));
1510
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyNudgeDown));
1511
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyNudgeLeft));
1512
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeyNudgeRight));
1514
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeySizeWidthIncrease));
1515
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeySizeHeightIncrease));
1516
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeySizeWidthDecrease));
1517
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyMove), MenuCommands.KeySizeHeightDecrease));
1519
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyCancel), MenuCommands.KeyCancel));
1520
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyCancel), MenuCommands.KeyReverseCancel));
1521
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandCopy), StandardCommands.Copy));
1522
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandSelectAll), StandardCommands.SelectAll));
1524
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandHome), MenuCommands.KeyHome));
1525
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandEnd), MenuCommands.KeyEnd));
1526
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandHome), MenuCommands.KeyShiftHome));
1527
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandEnd), MenuCommands.KeyShiftEnd));
1530
_newCommands.Add(new
MenuCommand
(new EventHandler(OnKeyShowDesignerActions), MenuCommands.KeyInvokeSmartTag));
1532
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandCopy), StandardCommands.Cut));
1533
_newCommands.Add(new
MenuCommand
(new EventHandler(OnCommandDelete), StandardCommands.Delete));
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (1)
438
_designerShortCutCommand = new
MenuCommand
(OnKeyShowDesignerActions, MenuCommands.KeyInvokeSmartTag);
150 references to MenuCommand
netstandard (1)
netstandard.cs (1)
274
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
MenuCommand
))]
System (1)
src\runtime\src\libraries\shims\System\ref\System.cs (1)
260
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ComponentModel.Design.
MenuCommand
))]
System.ComponentModel.TypeConverter (7)
System\ComponentModel\Design\IMenuCommandService.cs (5)
21
void AddCommand(
MenuCommand
command);
29
/// Searches for the given command ID and returns the <see cref='System.ComponentModel.Design.
MenuCommand
'/>
32
MenuCommand
? FindCommand(CommandID commandID);
40
/// Removes the specified <see cref='System.ComponentModel.Design.
MenuCommand
'/> from the document.
42
void RemoveCommand(
MenuCommand
command);
System\ComponentModel\Design\MenuCommand.cs (2)
45
/// Initializes a new instance of <see cref='System.ComponentModel.Design.
MenuCommand
'/>.
157
/// a <see cref='System.ComponentModel.Design.
MenuCommand
.CommandChanged'/> event.
System.Windows.Forms (1)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
5225
MenuCommand
? reset = menuCommandService.FindCommand(PropertyGridCommands.Reset);
System.Windows.Forms.Design (140)
System\ComponentModel\Design\DesignerActionUI.cs (1)
38
private readonly
MenuCommand
? _cmdShowDesignerActions; // used to respond to the Alt+Shift+F10 command
System\ComponentModel\Design\MenuCommandsChangedEventArgs.cs (2)
18
public MenuCommandsChangedEventArgs(MenuCommandsChangedType changeType,
MenuCommand
? command)
33
public
MenuCommand
? Command { get; }
System\ComponentModel\Design\MenuCommandService.cs (16)
19
private readonly Dictionary<Guid, List<
MenuCommand
>> _commandGroups;
73
public virtual void AddCommand(
MenuCommand
command)
89
if (!_commandGroups.TryGetValue(commandId.Guid, out List<
MenuCommand
>? commandsList))
156
foreach (KeyValuePair<Guid, List<
MenuCommand
>> group in _commandGroups)
158
List<
MenuCommand
> commands = group.Value;
159
foreach (
MenuCommand
command in commands)
312
public
MenuCommand
? FindCommand(CommandID commandID)
321
protected
MenuCommand
? FindCommand(Guid guid, int id)
324
List<
MenuCommand
>? commands;
332
foreach (
MenuCommand
command in commands)
380
List<
MenuCommand
>? commands;
410
MenuCommand
? cmd = ((IMenuCommandService)this).FindCommand(commandID);
429
MenuCommand
? cmd = ((IMenuCommandService)this).FindCommand(commandId);
444
OnCommandsChanged(new MenuCommandsChangedEventArgs(MenuCommandsChangedType.CommandChanged, (
MenuCommand
?)sender));
480
public virtual void RemoveCommand(
MenuCommand
command)
486
if (_commandGroups.TryGetValue(command.CommandID!.Guid, out List<
MenuCommand
>? commands))
System\Windows\Forms\Design\Behavior\Behavior.cs (1)
68
public virtual
MenuCommand
? FindCommand(CommandID commandId)
System\Windows\Forms\Design\Behavior\BehaviorService.cs (3)
539
private
MenuCommand
? FindCommand(CommandID commandID, IMenuCommandService menuService)
547
MenuCommand
? menuCommand = menuService.FindCommand(commandID);
556
MenuCommand
? menuCommand = behavior.FindCommand(commandID);
System\Windows\Forms\Design\Behavior\BehaviorService.MenuCommandHandler.cs (3)
23
void IMenuCommandService.AddCommand(
MenuCommand
command) => MenuService.AddCommand(command);
27
void IMenuCommandService.RemoveCommand(
MenuCommand
command) => MenuService.RemoveCommand(command);
29
MenuCommand
? IMenuCommandService.FindCommand(CommandID commandID)
System\Windows\Forms\Design\Behavior\DesignerActionKeyboardBehavior.cs (2)
29
public override
MenuCommand
? FindCommand(CommandID commandId)
43
MenuCommand
dummyMC = new(delegate
System\Windows\Forms\Design\CommandSet.cs (27)
731
CommandID? cmd = ((
MenuCommand
)sender!).CommandID;
957
MenuCommand
cmd = (
MenuCommand
)sender!;
1231
MenuCommand
cmd = (
MenuCommand
)sender!;
2163
MenuCommand
? btf = MenuService?.FindCommand(StandardCommands.BringToFront);
2255
((
MenuCommand
)sender!).Checked = !drawGrid;
2270
MenuCommand
cmd = (
MenuCommand
)sender!;
2488
((
MenuCommand
)sender!).Checked = !snapToGrid;
2505
MenuCommand
cmd = (
MenuCommand
)sender!;
2964
MenuCommand
cmd = (
MenuCommand
)sender!;
2974
MenuCommand
cmd = (
MenuCommand
)sender!;
2984
MenuCommand
cmd = (
MenuCommand
)sender!;
3022
if (((
MenuCommand
)sender!).Enabled)
3035
MenuCommand
cmd = (
MenuCommand
)sender!;
3070
MenuCommand
cmd = (
MenuCommand
)sender!;
3115
MenuCommand
cmd = (
MenuCommand
)sender!;
3121
MenuCommand
cmd = (
MenuCommand
)sender!;
System\Windows\Forms\Design\ComponentTray.cs (4)
45
private
MenuCommand
_tabOrderCommand;
62
private readonly
MenuCommand
_menucmdArrangeIcons;
63
private readonly
MenuCommand
_menucmdLineupIcons;
64
private readonly
MenuCommand
_menucmdLargeIcons;
System\Windows\Forms\Design\ControlCommandSet.cs (31)
446
MenuCommand
cmd = (
MenuCommand
)sender;
538
CommandID cmd = ((
MenuCommand
)sender).CommandID;
824
MenuCommand
cmd = (
MenuCommand
)sender;
860
MenuCommand
cmd = (
MenuCommand
)sender;
921
MenuCommand
cmd = (
MenuCommand
)sender;
960
MenuCommand
cmd = (
MenuCommand
)sender;
1134
MenuCommand
cmd = (
MenuCommand
)sender;
1150
MenuCommand
cmd = (
MenuCommand
)sender;
1161
MenuCommand
cmd = (
MenuCommand
)sender;
1168
MenuCommand
cmd = (
MenuCommand
)sender;
1214
MenuCommand
cmd = (
MenuCommand
)sender;
1225
MenuCommand
cmd = (
MenuCommand
)sender;
1235
MenuCommand
cmd = (
MenuCommand
)sender;
1253
MenuCommand
cmd = (
MenuCommand
)sender;
1270
MenuCommand
cmd = (
MenuCommand
)sender;
1286
MenuCommand
cmd = (
MenuCommand
)sender;
System\Windows\Forms\Design\DataGridViewColumnDesigner.cs (2)
292
public override
MenuCommand
? FindCommand(CommandID commandId)
294
MenuCommand
command;
System\Windows\Forms\Design\DocumentDesigner.cs (2)
40
private
MenuCommand
_tabOrderCommand;
1327
MenuCommand
cmd = mcs.FindCommand(StandardCommands.TabOrder);
System\Windows\Forms\Design\IMenuStatusHandler.cs (2)
17
bool OverrideInvoke(
MenuCommand
cmd);
23
bool OverrideStatus(
MenuCommand
cmd);
System\Windows\Forms\Design\ParentControlDesigner.cs (2)
1468
MenuCommand
tabCommand = ms.FindCommand(StandardCommands.TabOrder);
1667
MenuCommand
tabCommand = ms.FindCommand(StandardCommands.TabOrder);
System\Windows\Forms\Design\ParentControlDesigner.EscapeHandler.cs (2)
28
public bool OverrideInvoke(
MenuCommand
cmd)
45
public bool OverrideStatus(
MenuCommand
cmd)
System\Windows\Forms\Design\StandardCommandToolStripMenuItem.cs (1)
20
private readonly
MenuCommand
? _menuCommand;
System\Windows\Forms\Design\StatusCommandUI.cs (2)
16
private
MenuCommand
? _statusRectCommand;
33
private
MenuCommand
? StatusRectCommand => _statusRectCommand ??= MenuService?.FindCommand(MenuCommands.SetStatusRectangle);
System\Windows\Forms\Design\TabOrder.cs (7)
34
private readonly
MenuCommand
[] _commands;
35
private readonly
MenuCommand
[] _newCommands;
115
foreach (
MenuCommand
mc in _newCommands)
158
foreach (
MenuCommand
mc in _newCommands)
502
MenuCommand
? mc = mcs.FindCommand(StandardCommands.TabOrder);
669
public bool OverrideInvoke(
MenuCommand
cmd)
688
public bool OverrideStatus(
MenuCommand
cmd)
System\Windows\Forms\Design\ToolStripKeyboardHandlingService.cs (22)
36
private List<
MenuCommand
> _oldCommands;
38
private List<
MenuCommand
> _newCommands;
40
private
MenuCommand
_oldCommandPaste;
41
private
MenuCommand
_newCommandPaste;
229
foreach (
MenuCommand
newCommand in _newCommands)
247
foreach (
MenuCommand
newCommand in _newCommands)
268
foreach (
MenuCommand
oldCommand in _oldCommands)
283
foreach (
MenuCommand
newCommand in _newCommands)
439
MenuCommand
command = sender as
MenuCommand
;
440
foreach (
MenuCommand
oldCommand in _oldCommands)
519
if (sender is
MenuCommand
com && com.CommandID == StandardCommands.Cut)
914
CommandID cmd = ((
MenuCommand
)sender).CommandID;
965
MenuCommand
cmd = (
MenuCommand
)sender;
1044
MenuCommand
cmd = (
MenuCommand
)sender;
1070
MenuCommand
cmd = (
MenuCommand
)sender;
1545
foreach (
MenuCommand
newCommand in _newCommands)
1554
foreach (
MenuCommand
oldCommand in _oldCommands)
1601
foreach (
MenuCommand
newCommand in _newCommands)
System\Windows\Forms\Design\ToolStripPanelDesigner.cs (2)
34
private
MenuCommand
? _designerShortCutCommand;
35
private
MenuCommand
? _oldShortCutCommand;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (6)
52
private readonly
MenuCommand
[] _commands;
54
private readonly
MenuCommand
[] _addCommands;
101
private
MenuCommand
_oldUndoCommand;
102
private
MenuCommand
_oldRedoCommand;
1190
public bool OverrideInvoke(
MenuCommand
cmd)
1210
public bool OverrideStatus(
MenuCommand
cmd)