Browse Source

Update FluentTheme.cs

pull/8291/head
Max Katz 4 years ago
committed by GitHub
parent
commit
138beb0b46
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/Avalonia.Themes.Fluent/FluentTheme.cs

8
src/Avalonia.Themes.Fluent/FluentTheme.cs

@ -83,6 +83,14 @@ namespace Avalonia.Themes.Fluent
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)

Loading…
Cancel
Save