System.Windows.Forms.Design.Behavior.Behavior.DisableAllCommands Property

Gets a value indicating whether System.ComponentModel.Design.MenuCommand objects should be disabled.

Syntax

public virtual bool DisableAllCommands { get; }

Value

Documentation for this section has not yet been entered.

Remarks

A true value for the Behavior.DisableAllCommands property indicates to the System.Windows.Forms.Design.Behavior.BehaviorService that all System.ComponentModel.Design.MenuCommand objects the designer receives should have their state disabled when this behavior is active.

The Behavior.DisableAllCommands property works in conjunction with the Behavior.FindCommand(System.ComponentModel.Design.CommandID) method so you can customize the interaction between glyphs and behaviors. The following table summarizes the results of a call to Behavior.FindCommand(System.ComponentModel.Design.CommandID) for a particular System.ComponentModel.Design.MenuCommand.

Behavior.DisableAllCommands is true

Behavior.DisableAllCommands is false

Hit-tested glyph has an assigned behavior

If the System.ComponentModel.Design.MenuCommand with the specified command ID is found in the System.ComponentModel.Design.IMenuCommandService, that System.ComponentModel.Design.MenuCommand is disabled and returned. Otherwise, null is returned.

erload:System.ComponentModel.Design.MenuCommandService.FindCommand is called on the behavior and, if found, the behavior’s System.ComponentModel.Design.MenuCommand is returned. Otherwise, the result of System.ComponentModel.Design.IMenuCommandService.FindCommand(System.ComponentModel.Design.CommandID) with the specified command ID is returned.

Hit-tested glyph has no assigned behavior

The result of System.ComponentModel.Design.IMenuCommandService.FindCommand(System.ComponentModel.Design.CommandID) with the specified command ID is returned.

The result of System.ComponentModel.Design.IMenuCommandService.FindCommand(System.ComponentModel.Design.CommandID) with the specified command ID is returned.

Requirements

Namespace: System.Windows.Forms.Design.Behavior
Assembly: System.Design (in System.Design.dll)
Assembly Versions: 2.0.0.0