From 48ba446936b51fffafa7c3600c0dadc6ac0e8c20 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 10 七月 2020 10:52:13 +0800 Subject: [PATCH] 2020-07-10-01 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs index 92a82d0..ed13ec9 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs @@ -5,9 +5,9 @@ namespace Shared.Phone.UserCenter { /// <summary> - /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,瀹冧細鏀瑰彉楂樺害) + /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害) /// </summary> - public class FrameListControl : FrameLayout + public class FrameListControl : FrameLayoutBase { /// <summary> /// 琛屼箣闂寸殑闂磋窛 @@ -15,7 +15,7 @@ public int rowSpace = 0; /// <summary> - /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,瀹冧細鏀瑰彉楂樺害) + /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害) /// </summary> /// <param name="i_rowSpace">琛屼箣闂寸殑闂磋窛(杩欎釜鍊兼槸涓庤鎺т欢缁戝畾涓�璧蜂娇鐢ㄧ殑)</param> public FrameListControl(int i_rowSpace = 12) @@ -54,5 +54,27 @@ base.AddChidren(view); } } + + /// <summary> + /// 璋冩暣鐪熷疄楂樺害 + /// </summary> + /// <param name="bottomSpace">搴曢儴楂樺害(闈炵湡瀹炲��)</param> + public void AdjustRealHeight(int bottomSpace = 0) + { + int bottomHeight = -1; + + for (int i = 0; i < this.ChildrenCount; i++) + { + var child = this.GetChildren(i); + if (child.Bottom > bottomHeight) + { + bottomHeight = child.Bottom; + } + } + if (bottomHeight != -1) + { + this.Height = bottomHeight + bottomSpace; + } + } } } -- Gitblit v1.8.0