File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -32,5 +32,13 @@ static partial void StartPartial(ApplicationInitializationCallback callback)
32
32
/// </remarks>
33
33
private DateTimeOffset GetSuspendingOffset ( ) => DateTimeOffset . Now . AddSeconds ( 5 ) ;
34
34
35
- partial void ApplySystemOverlaysTheming ( ) => NativeWindowWrapper . Instance ? . ApplySystemOverlaysTheming ( ) ;
35
+ partial void ApplySystemOverlaysTheming ( )
36
+ {
37
+ // This is needed only due to the fact that currently Instance accessor creates the wrapper
38
+ // eagerly - which could then happen too early. Will no longer be needed when un-singletoned.
39
+ if ( InitializationComplete )
40
+ {
41
+ NativeWindowWrapper . Instance . ApplySystemOverlaysTheming ( ) ;
42
+ }
43
+ }
36
44
}
Original file line number Diff line number Diff line change @@ -444,10 +444,7 @@ private void SetRequestedTheme(ApplicationTheme requestedTheme)
444
444
445
445
internal void OnRequestedThemeChanged ( )
446
446
{
447
- if ( InitializationComplete )
448
- {
449
- ApplySystemOverlaysTheming ( ) ;
450
- }
447
+ ApplySystemOverlaysTheming ( ) ;
451
448
OnResourcesChanged ( ResourceUpdateReason . ThemeResource ) ;
452
449
}
453
450
You can’t perform that action at this time.
0 commit comments