Browse Source

Add IgnoreTaskbarWhenMaximized property to IWindowImpl

pull/806/head
Dan Walmsley 10 years ago
parent
commit
ae40a3fa56
  1. 19
      src/Avalonia.Controls/Window.cs

19
src/Avalonia.Controls/Window.cs

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

Loading…
Cancel
Save