How to Get PCF Controls Ready for Dark Mode in Model-Driven Apps


Support for Dark Mode in Power Platform Model-Driven apps is coming soon. Recent investments in the platform, such as the "New look" that leverages the Fluent 2 design system, are paving the way for Dark Mode. While waiting for an official Dark Mode toggle, you can switch to Dark Mode by adding a snippet to the URL of a Model-Driven app. PCF control authors can detect Dark Mode at runtime by inspecting the context object received by the control. By checking the context.fluentDesignLanguage.isDarkTheme property, controls can be rendered with the appropriate theme. Using FluentUI v9 can simplify the process of adapting controls to Dark Mode.


Article 12m

Login now to access my digest by 365.Training

Learn how my digest works
Features
  • Articles, blogs, podcasts, training, and videos
  • Quick read TL;DRs for each item
  • Advanced filtering to prioritize what you care about
  • Quick views to isolate what you are looking for right now
  • Save your favorite items
  • Share your favorites
  • Snooze items you want to revisit when you have more time