Single C# (Source) file version - the ThemeManager class provides static methods to be used during app initialization to force the app's resources to appear as the Dark or Light theme.
$ dotnet add package PhoneThemeManager.SourceNo README available.