Dark mode - .NET MAUI

In MAUI, you can detect the current theme configuration using the Application.Current.RequestedTheme property.

public bool IsInDarkMode
    => Application.Current.RequestedTheme == AppTheme.Dark;