黄学彪
2020-09-22 7a2b08af309d3b16e380c83063da8211cc97217a
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs
@@ -32,10 +32,10 @@
            if (view is FrameRowControl || view is RowLayoutControl)
            {
                //FrameRowLayout控件的时候,直接扩大它的高度
                var tempView = this.GetChildren(this.ChildrenCount - 1);
                if (tempView != null)
                var intBottom = this.GetLocationMostLastViewBottom();
                if (intBottom != -1)
                {
                    view.Y = tempView.Bottom;
                    view.Y = intBottom;
                }
                base.AddChidren(view);
                if (rowSpace > 0)
@@ -46,10 +46,10 @@
            else
            {
                //非FrameRowLayout控件的时候,计算的是坐标
                var tempView = this.GetChildren(this.ChildrenCount - 1);
                if (tempView != null)
                var intBottom = this.GetLocationMostLastViewBottom();
                if (intBottom != -1)
                {
                    view.Y = tempView.Bottom + rowSpace;
                    view.Y = intBottom + rowSpace;
                }
                base.AddChidren(view);
            }
@@ -76,5 +76,24 @@
                this.Height = bottomHeight + bottomSpace;
            }
        }
        /// <summary>
        /// 获取坐标底部最下面的那个控件的底部坐标
        /// </summary>
        /// <returns></returns>
        private int GetLocationMostLastViewBottom()
        {
            int bottomHeight = -1;
            for (int i = 0; i < this.ChildrenCount; i++)
            {
                var child = this.GetChildren(i);
                if (child.Bottom > bottomHeight)
                {
                    bottomHeight = child.Bottom;
                }
            }
            return bottomHeight;
        }
    }
}