Forum Discussion
Anonymous
5 years agoNot applicable
Can I detect a theme change in a custom visual?
When I switch the theme in Power BI Desktop, it triggers a refresh of my custom visual. In my visual's Update method is there a way to tell whether the current refresh has been triggered because of a...
- 5 years ago
Hi Anonymous,
The VisualUpdateType enum in the API, doesn't have an event for a theme change. I expect that because themes can potentially cause changes in property defaults (and this can include properties in custom visuals), this would be the same as manually triggering a property update in the pane, which would be VisualUpdateType.All in the update options.
Regards,
Daniel
Anonymous
5 years agoNot applicable
As I feared. Ah well. Thanks for the confirmation!
dm-p
Super User
5 years agoI probably should have added in my original reply, that you could try requesting it to be added to the API. It might be constrained by the underlying limitations of Power BI, but it never hurts to ask, as it might be possible for the team to expose for you if they can.