VisibilityConstraints doesn't work properly, or it works just before the command is executed #487
-
Hi, I have a quick question... <VisibilityConstraints>
<VisibilityItem guid="MyGuid" id="ExportGraphCommand" context="uiContextSupportedFiles"/>
</VisibilityConstraints> It works perfectly before it is executed for the first time... When I click on the button for the first time, it stays enabled even if I switch to other files, where it shouldn't be enabled.... What should I do? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Visibility constrains works until your Package is loaded, then the command takes over and you can implement the logic using BeforeQueryStatus, or you can delegate the logic back to the VisibilityConstraint using this method in your protected override Task InitializeCompletedAsync()
{
Command.Supported = false;
return base.InitializeCompletedAsync();
} |
Beta Was this translation helpful? Give feedback.
Visibility constrains works until your Package is loaded, then the command takes over and you can implement the logic using BeforeQueryStatus, or you can delegate the logic back to the VisibilityConstraint using this method in your
Command
: