/// <summary> /// Draws the cell. /// </summary> public virtual void Draw() { Debug.Assert(StateView != null); Debug.Assert(StateView.ControllerView != null); ILayoutDrawContext DrawContext = StateView.ControllerView.DrawContext; Debug.Assert(DrawContext != null); ILayoutDrawableFrame AsDrawableFrame = Frame as ILayoutDrawableFrame; Debug.Assert(AsDrawableFrame != null); Debug.Assert(RegionHelper.IsFixed(ActualCellSize)); CollectionWithSeparator.DrawBeforeItem(DrawContext, ReferenceContainer, CellOrigin, ActualCellSize, CellPadding); AsDrawableFrame.Draw(DrawContext, this, CellOrigin, ActualCellSize, CellPadding); CollectionWithSeparator.DrawAfterItem(DrawContext, ReferenceContainer, CellOrigin, ActualCellSize, CellPadding); }
/// <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)); }