diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index 853347bf41..b2bd52e8a2 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -153,9 +153,13 @@ namespace Avalonia.Controls BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); TitleProperty.Changed.AddClassHandler((s, e) => s.PlatformImpl?.SetTitle((string)e.NewValue)); HasSystemDecorationsProperty.Changed.AddClassHandler( - (s, e) => s.PlatformImpl?.SetSystemDecorations(((bool)e.NewValue) ? SystemDecorations.Full : SystemDecorations.None)); + (s, e) => s.SetValue(SystemDecorationsProperty, (bool)e.NewValue ? SystemDecorations.Full : SystemDecorations.None)); SystemDecorationsProperty.Changed.AddClassHandler( - (s, e) => s.PlatformImpl?.SetSystemDecorations((SystemDecorations)e.NewValue)); + (s, e) => + { + s.PlatformImpl?.SetSystemDecorations((SystemDecorations)e.NewValue); + s.SetValue(HasSystemDecorationsProperty, (SystemDecorations)e.NewValue != SystemDecorations.None); + }); ShowInTaskbarProperty.Changed.AddClassHandler((w, e) => w.PlatformImpl?.ShowTaskbarIcon((bool)e.NewValue));