From b5f8e30be462a236432e26fa1cff1a81a290c3d3 Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Mon, 17 Aug 2026 18:08:00 +0800 Subject: [PATCH] fix: Row fails to arrange Cols when the template is instantiated while the hosting window is hidden --- src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs index 3b4bd3ce4..50ff13889 100644 --- a/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs +++ b/src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs @@ -88,7 +88,9 @@ protected override Size ArrangeOverride(Size finalSize) foreach (var child in cols) { - if (!child.IsVisible) + // Check the local Visibility, not IsVisible: Cols skipped while the hosting + // window is hidden can never recover their layout once it is shown again. + if (child.Visibility != Visibility.Visible) { continue; }