|
|
|
@ -104,6 +104,9 @@ namespace Avalonia.Controls |
|
|
|
public static readonly StyledProperty<bool> CanResizeProperty = |
|
|
|
AvaloniaProperty.Register<Window, bool>(nameof(CanResize), true); |
|
|
|
|
|
|
|
public static readonly StyledProperty<bool> TopmostProperty = |
|
|
|
AvaloniaProperty.Register<Window, bool>(nameof(Topmost)); |
|
|
|
|
|
|
|
private readonly NameScope _nameScope = new NameScope(); |
|
|
|
private object _dialogResult; |
|
|
|
private readonly Size _maxPlatformClientSize; |
|
|
|
@ -125,6 +128,8 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
CanResizeProperty.Changed.AddClassHandler<Window>((w, e) => w.PlatformImpl?.CanResize((bool)e.NewValue)); |
|
|
|
|
|
|
|
TopmostProperty.Changed.AddClassHandler<Window>((w, e) => w.PlatformImpl?.SetTopmost((bool)e.NewValue)); |
|
|
|
|
|
|
|
WindowStateProperty.Changed.AddClassHandler<Window>( |
|
|
|
(w, e) => { if (w.PlatformImpl != null) w.PlatformImpl.WindowState = (WindowState)e.NewValue; }); |
|
|
|
} |
|
|
|
@ -230,6 +235,15 @@ namespace Avalonia.Controls |
|
|
|
set { SetValue(CanResizeProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets whether this window appears on top of all other windows
|
|
|
|
/// </summary>
|
|
|
|
public bool Topmost |
|
|
|
{ |
|
|
|
get { return GetValue(TopmostProperty); } |
|
|
|
set { SetValue(TopmostProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the icon of the window.
|
|
|
|
/// </summary>
|
|
|
|
|