|
|
@@ -29,6 +29,7 @@ namespace Avalonia.Controls
|
|
|
public static readonly DirectProperty<WindowBase, bool> IsActiveProperty =
|
|
|
AvaloniaProperty.RegisterDirect<WindowBase, bool>(nameof(IsActive), o => o.IsActive);
|
|
|
|
|
|
+ private bool _hasExecutedInitialLayoutPass;
|
|
|
private bool _isActive;
|
|
|
private bool _ignoreVisibilityChange;
|
|
|
|
|
|
@@ -136,7 +137,13 @@ namespace Avalonia.Controls
|
|
|
{
|
|
|
EnsureInitialized();
|
|
|
IsVisible = true;
|
|
|
- LayoutManager.Instance.ExecuteInitialLayoutPass(this);
|
|
|
+
|
|
|
+ if (!_hasExecutedInitialLayoutPass)
|
|
|
+ {
|
|
|
+ LayoutManager.Instance.ExecuteInitialLayoutPass(this);
|
|
|
+ _hasExecutedInitialLayoutPass = true;
|
|
|
+ }
|
|
|
+
|
|
|
PlatformImpl?.Show();
|
|
|
}
|
|
|
finally
|