Behavior::DisableAllCommands Property
Gets a value indicating whether MenuCommand objects should be disabled.
Assembly: System.Design (in System.Design.dll)
Property Value
Type: System::Booleantrue if all MenuCommand objects the designer receives should have states set to Enabled = false when this Behavior is active; otherwise, false.
A true value for the DisableAllCommands property indicates to the BehaviorService that all MenuCommand objects the designer receives should have their state disabled when this behavior is active.
The DisableAllCommands property works in conjunction with the FindCommand method so you can customize the interaction between glyphs and behaviors. The following table summarizes the results of a call to FindCommand for a particular MenuCommand.
DisableAllCommands is true | DisableAllCommands is false | |
Hit-tested glyph has an assigned behavior | If the MenuCommand with the specified command ID is found in the IMenuCommandService, that MenuCommand is disabled and returned. Otherwise, null is returned. | FindCommand is called on the behavior and, if found, the behavior’s MenuCommand is returned. Otherwise, the result of IMenuCommandService::FindCommand with the specified command ID is returned. |
Hit-tested glyph has no assigned behavior | The result of IMenuCommandService::FindCommand with the specified command ID is returned. | The result of IMenuCommandService::FindCommand with the specified command ID is returned. |
Notes to Inheritors:
The default implementation always returns false.
Available since 2.0