diff --git a/src/Avalonia.Themes.Fluent/FluentTheme.cs b/src/Avalonia.Themes.Fluent/FluentTheme.cs index 2a8e045c485..81601f72a10 100644 --- a/src/Avalonia.Themes.Fluent/FluentTheme.cs +++ b/src/Avalonia.Themes.Fluent/FluentTheme.cs @@ -83,6 +83,14 @@ public DensityStyle DensityStyle protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change) { base.OnPropertyChanged(change); + + if (_loaded is null) + { + // If style wasn't yet loaded, no need to change children styles, + // it will be applied later in Loaded getter. + return; + } + if (change.Property == ModeProperty) { if (Mode == FluentThemeMode.Dark)