From 66a9965c44ecc32a6696abca876ab9d1cd091584 Mon Sep 17 00:00:00 2001
From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local>
Date: 星期五, 28 二月 2020 15:25:13 +0800
Subject: [PATCH] 2020.2.28

---
 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
index ed9c5a9..8f1f343 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
@@ -31,7 +31,7 @@
             get
             {
                 int count = base.ChildrenCount;
-                if (frameBackTemp != null)
+                if (frameBackTemp != null && frameBackTemp.Parent != null)
                 {
                     count--;
                 }
@@ -49,7 +49,7 @@
         /// <param name="i_rowSpace">琛屼箣闂寸殑闂磋窛(杩欎釜鍊兼槸涓庤鎺т欢缁戝畾涓�璧蜂娇鐢ㄧ殑)</param>
         public VerticalListControl(int i_rowSpace = 0)
         {
-            rowSpace = Application.GetRealHeight(i_rowSpace);
+            this.rowSpace = Application.GetRealHeight(i_rowSpace);
         }
 
         #endregion
@@ -97,16 +97,14 @@
         /// <param name="addSpace">褰撶湡瀹為珮搴﹁秴杩囧師鏈夐珮搴︽椂,鏄惁娣诲姞绌虹櫧</param>
         public void AdjustRealHeight(int bottomSpace, bool addSpace = true)
         {
-            int count = frameBackTemp == null ? this.ChildrenCount : this.ChildrenCount - 1;
+            //鎬讳箣,鍏堥噸缃嚦鏈�澶�
+            this.RecoverHeight();
+
+            int count = this.ChildrenCount;
             if (count <= 0)
             {
                 frameBackTemp?.RemoveFromParent();
                 frameBackTemp = null;
-                if (maxHeight != -1)
-                {
-                    //杩樺師涓烘渶澶ч珮搴�
-                    this.Height = maxHeight;
-                }
                 return;
             }
 

--
Gitblit v1.8.0