ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/ListViewLayoutControls/VerticalListControl.cs
@@ -49,5 +49,28 @@ } } #endregion #region ■ 调整真实高度_______________________ /// <summary> /// 调整控件真实高度(只针对行控件都是相同高度的,高度只会减少,不会增加) /// </summary> /// <param name="bottomSpace">底部空白间距(真实值)</param> public void AdjustRealHeight(int bottomSpace) { if (this.ChildrenCount == 0) { return; } //调整列表控件的高度 var realHeight = this.ChildrenCount * this.GetChildren(0).Height + bottomSpace; if (realHeight < this.Height) { //缩小控件高度 this.Height = realHeight; } } #endregion } }