diff --git a/src/Avalonia.Controls/Window.cs b/src/Avalonia.Controls/Window.cs index e0d5cddc9e..2c83cfe1c0 100644 --- a/src/Avalonia.Controls/Window.cs +++ b/src/Avalonia.Controls/Window.cs @@ -64,6 +64,12 @@ namespace Avalonia.Controls public static readonly StyledProperty HasSystemDecorationsProperty = AvaloniaProperty.Register(nameof(HasSystemDecorations), true); + /// + /// When system window decorations are disables sets if the Window when maximized ignores the taskbar. + /// + public static readonly StyledProperty IgnoreTaskbarOnMaximizeProperty = + AvaloniaProperty.Register(nameof(IgnoreTaskBarOnMaximize), false); + /// /// Defines the property. /// @@ -89,6 +95,10 @@ namespace Avalonia.Controls TitleProperty.Changed.AddClassHandler((s, e) => s.PlatformImpl.SetTitle((string)e.NewValue)); HasSystemDecorationsProperty.Changed.AddClassHandler( (s, e) => s.PlatformImpl.SetSystemDecorations((bool) e.NewValue)); + + IgnoreTaskbarOnMaximizeProperty.Changed.AddClassHandler( + (s, e) => s.PlatformImpl.SetIgnoreTaskBarWhenMaximized((bool)e.NewValue)); + IconProperty.Changed.AddClassHandler((s, e) => s.PlatformImpl.SetIcon(((WindowIcon)e.NewValue).PlatformImpl)); } @@ -157,6 +167,15 @@ namespace Avalonia.Controls set { SetValue(HasSystemDecorationsProperty, value); } } + /// + /// When system window decorations are disables sets if the Window when maximized ignores the taskbar. + /// + public bool IgnoreTaskBarOnMaximize + { + get { return GetValue(IgnoreTaskbarOnMaximizeProperty); } + set { SetValue(IgnoreTaskbarOnMaximizeProperty, value); } + } + /// /// Gets or sets the minimized/maximized state of the window. ///