Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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...
  • dm-p's avatar
    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