Skip to content

Change text/visibility of a command/button #505

Answered by jamesc-skyward
pbanosdev asked this question in Q&A
Discussion options

You must be logged in to vote

In your Command class that inherits from BaseCommand, you should have access to the Command property:

public OleMenuCommand Command { get; protected set; } = null!; // This property is initialized in `InitializeAsync`, so it's never actually null.

With this you should be able to change the text and visibility.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@pbanosdev
Comment options

Comment options

You must be logged in to vote
1 reply
@pbanosdev
Comment options

Answer selected by pbanosdev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants