Behavior.DisableAllCommands Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether MenuCommand objects should be disabled.
public:
virtual property bool DisableAllCommands { bool get(); };
public virtual bool DisableAllCommands { get; }
member this.DisableAllCommands : bool
Public Overridable ReadOnly Property DisableAllCommands As Boolean
Property Value
true
if all MenuCommand objects the designer receives should have states set to Enabled = false
when this Behavior is active; otherwise, false
.
Remarks
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
.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기