/// <summary> /// Prints the selection. /// </summary> public virtual void Print() { ILayoutNodeState State = StateView.State; ILayoutBlockListInner ParentInner = State.PropertyToInner(PropertyName) as ILayoutBlockListInner; Debug.Assert(ParentInner != null); LayoutControllerView ControllerView = StateView.ControllerView; Debug.Assert(ControllerView.PrintContext != null); ControllerView.UpdateLayout(); Debug.Assert(StartIndex <= EndIndex); LayoutBlockStateView FirstBlockStateView = (LayoutBlockStateView)ControllerView.BlockStateViewTable[ParentInner.BlockStateList[StartIndex]]; Point Origin = FirstBlockStateView.CellOrigin.Opposite; for (int i = StartIndex; i < EndIndex; i++) { LayoutBlockStateView BlockStateView = (LayoutBlockStateView)ControllerView.BlockStateViewTable[ParentInner.BlockStateList[i]]; Debug.Assert(RegionHelper.IsValid(BlockStateView.ActualCellSize)); BlockStateView.PrintCells(Origin); } }
/// <summary> /// Initializes a new instance of the <see cref="LayoutBlockCellView"/> class. /// </summary> /// <param name="stateView">The state view containing the tree with this cell.</param> /// <param name="parentCellView">The collection of cell views containing this view.</param> /// <param name="blockStateView">The block state view of the state associated to this cell.</param> public LayoutBlockCellView(ILayoutNodeStateView stateView, ILayoutCellViewCollection parentCellView, LayoutBlockStateView blockStateView) : base(stateView, parentCellView, blockStateView) { CellOrigin = RegionHelper.InvalidOrigin; CellSize = RegionHelper.InvalidSize; CellPadding = Padding.Empty; ActualCellSize = RegionHelper.InvalidSize; }