From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs index a32a785..ed13ec9 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs @@ -7,7 +7,7 @@ /// <summary> /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害) /// </summary> - public class FrameListControl : FrameLayout + public class FrameListControl : FrameLayoutBase { /// <summary> /// 琛屼箣闂寸殑闂磋窛 @@ -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