|
|
@ -39,6 +39,7 @@ namespace Avalonia.Controls |
|
|
public static readonly StyledProperty<bool> TopmostProperty = |
|
|
public static readonly StyledProperty<bool> TopmostProperty = |
|
|
AvaloniaProperty.Register<WindowBase, bool>(nameof(Topmost)); |
|
|
AvaloniaProperty.Register<WindowBase, bool>(nameof(Topmost)); |
|
|
|
|
|
|
|
|
|
|
|
private int _autoSizing; |
|
|
private bool _hasExecutedInitialLayoutPass; |
|
|
private bool _hasExecutedInitialLayoutPass; |
|
|
private bool _isActive; |
|
|
private bool _isActive; |
|
|
private bool _ignoreVisibilityChange; |
|
|
private bool _ignoreVisibilityChange; |
|
|
@ -97,11 +98,7 @@ namespace Avalonia.Controls |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Whether an auto-size operation is in progress.
|
|
|
/// Whether an auto-size operation is in progress.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
protected bool AutoSizing |
|
|
protected bool AutoSizing => _autoSizing > 0; |
|
|
{ |
|
|
|
|
|
get; |
|
|
|
|
|
private set; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the owner of the window.
|
|
|
/// Gets or sets the owner of the window.
|
|
|
@ -186,8 +183,8 @@ namespace Avalonia.Controls |
|
|
/// </remarks>
|
|
|
/// </remarks>
|
|
|
protected IDisposable BeginAutoSizing() |
|
|
protected IDisposable BeginAutoSizing() |
|
|
{ |
|
|
{ |
|
|
AutoSizing = true; |
|
|
++_autoSizing; |
|
|
return Disposable.Create(() => AutoSizing = false); |
|
|
return Disposable.Create(() => --_autoSizing); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
|