Platform Theme not changing when switching UserAppTheme

Arthur P 20 Reputation points
2025-12-17T17:40:47.0233333+00:00

Hello,

I wanted to dynamically switch the theme in my app (https://learn.microsoft.com/en-us/dotnet/maui/user-interface/system-theme-changes?view=net-maui-10.0#set-the-current-user-theme), but realized that the platform-specific UI still has the theme it started with. I tested it with outputting the Application.Current.PlatformAppTheme value and it stayed the same (tested on Windows and Android).

How do I also switch the platform theme dynamically?

Thanks for the help

Arthur

Developer technologies | .NET | .NET MAUI
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jack Dang (WICLOUD CORPORATION) 6,300 Reputation points Microsoft External Staff Moderator
    2025-12-18T06:29:22.71+00:00

    Hi @Arthur P ,

    Thanks for reaching out.

    This behavior is expected and is due to the distinction between app theming and platform (OS) theming in .NET MAUI.

    When you set Application.Current.UserAppTheme, you are only changing how your MAUI app renders its own UI. This can be changed dynamically at runtime and affects only the app.

    Application.Current.PlatformAppTheme, however, reflects the operating system’s current theme (Light or Dark). This value is read-only and is determined entirely by the OS. Changing UserAppTheme does not - and cannot - change the platform theme.

    At the OS level:

    • Android does not allow apps to programmatically switch the system-wide theme.
    • Windows also does not allow applications to change the user’s system theme.

    Because MAUI follows platform rules and user expectations, there is no supported way to dynamically change the platform/OS theme from a MAUI app. The only thing an app can do is either:

    • Follow the system theme by setting UserAppTheme = AppTheme.Unspecified, or
    • Override the app’s appearance independently by setting UserAppTheme to Light or Dark.

    So to directly answer your question: you cannot dynamically switch the platform theme. PlatformAppTheme will only change when the user changes the OS theme itself.

    Hope this helps! If my answer was helpful - kindly follow the instructions here so others with the same problem can benefit as well.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.