Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not 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 change in theme?

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

3 REPLIES 3
dm-p
Super User
Super User

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





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

As I feared. Ah well. Thanks for the confirmation!

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.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.