Forum Discussion
Can I detect a theme change in a custom visual?
- 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
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
As I feared. Ah well. Thanks for the confirmation!
- dm-p5 years ago
Super User
I 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.