/// <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> /// Prints the cell. /// </summary> /// <param name="origin">The origin from where to start printing.</param> public virtual void Print(Point origin) { Debug.Assert(StateView != null); Debug.Assert(StateView.ControllerView != null); ILayoutPrintContext PrintContext = StateView.ControllerView.PrintContext; Debug.Assert(PrintContext != null); ILayoutPrintableFrame AsPrintableFrame = Frame as ILayoutPrintableFrame; Debug.Assert(AsPrintableFrame != null); Debug.Assert(RegionHelper.IsValid(ActualCellSize)); origin = origin.Moved(CellOrigin.X, CellOrigin.Y); CollectionWithSeparator.PrintBeforeItem(PrintContext, ReferenceContainer, origin, ActualCellSize, CellPadding); AsPrintableFrame.Print(PrintContext, this, origin, ActualCellSize, CellPadding); CollectionWithSeparator.PrintAfterItem(PrintContext, ReferenceContainer, origin, ActualCellSize, CellPadding); }