/// <summary> /// Updates the actual size of the cell. /// </summary> public virtual void UpdateActualSize() { ActualCellSize = CellSize; if (ParentCellView != null) { ActualCellSize = ParentCellView.GetMeasuredSize(CellSize); } Debug.Assert(RegionHelper.IsFixed(ActualCellSize)); Debug.Assert(Size.IsEqual(CellRect.Size, ActualCellSize)); }
/// <summary> /// Updates the actual size of the cell. /// </summary> public virtual void UpdateActualSize() { ActualCellSize = CellSize; if (ParentCellView != null) { ActualCellSize = ParentCellView.GetMeasuredSize(CellSize); } foreach (ILayoutCellView CellView in CellViewList) { CellView.UpdateActualSize(); Debug.Assert(RegionHelper.IsFixed(CellView.ActualCellSize)); } Debug.Assert(Size.IsEqual(CellRect.Size, ActualCellSize)); }
/// <summary> /// Returns the measured size of streched cells in the collection. /// </summary> /// <param name="size">The cell size.</param> public virtual Size GetMeasuredSize(Size size) { Debug.Assert(!size.Width.IsFloating); Measure Height = size.Height; if (Height.IsFloating) { Height = CellSize.Height; } if (!Height.IsFloating) { Size MeasuredSize = new Size(size.Width, Height); return(MeasuredSize); } else { return(ParentCellView.GetMeasuredSize(size)); } }
/// <summary> /// Updates the actual size of the cell. /// </summary> public virtual void UpdateActualSize() { Debug.Assert(StateView != null); Debug.Assert(StateView.ControllerView != null); ILayoutMeasureContext MeasureContext = StateView.ControllerView.MeasureContext; Debug.Assert(MeasureContext != null); ILayoutDrawableFrame AsDrawableFrame = Frame as ILayoutDrawableFrame; Debug.Assert(AsDrawableFrame != null); ActualCellSize = CellSize; if (ParentCellView != null) { ActualCellSize = ParentCellView.GetMeasuredSize(CellSize); } Debug.Assert(RegionHelper.IsFixed(ActualCellSize)); Debug.Assert(Size.IsEqual(CellRect.Size, ActualCellSize)); }