Repository navigation
Set command icon at runtime #272
Answered
by
madskristensen
ben-hamida
asked this question in
Q&A
|
Is there a way to set the icon on a OleMenuCommand at runtime? I know I can define two separate commands and set their visibilities but in my case the icon is not even known at compile time. I would for example be reading it from disk or a windows API. I want to create a command to launch an external app but I don't know what app it is until at runtime. Is there perhaps a way to access the underlying WPF UI element by somehow traversing the visual tree and set the icon directly that way? |
Answered by
madskristensen
Jan 20, 2022
Replies: 1 comment
|
You cannot set the icon dynamically. It's a known limitation and the extensibility team is looking at improving that for a (far-)future update. |
0 replies
Answer selected by
ben-hamida
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You cannot set the icon dynamically. It's a known limitation and the extensibility team is looking at improving that for a (far-)future update.