/// <summary> /// Create cells for the provided state view. /// </summary> /// <param name="context">Context used to build the cell view tree.</param> /// <param name="parentCellView">The parent cell view.</param> public virtual IFrameCellView BuildNodeCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView) { IFrameNodeState State = context.StateView.State; Debug.Assert(State != null); Debug.Assert(State.InnerTable != null); Debug.Assert(State.InnerTable.ContainsKey(PropertyName)); IFrameListInner <IFrameBrowsingListNodeIndex> Inner = State.InnerTable[PropertyName] as IFrameListInner <IFrameBrowsingListNodeIndex>; Debug.Assert(Inner != null); FrameNodeStateViewDictionary StateViewTable = context.ControllerView.StateViewTable; FrameCellViewList CellViewList = CreateCellViewList(); IFrameCellViewCollection EmbeddingCellView = CreateEmbeddingCellView(context.StateView, parentCellView, CellViewList); ValidateEmbeddingCellView(context, EmbeddingCellView); foreach (IFrameNodeState ChildState in Inner.StateList) { Debug.Assert(StateViewTable.ContainsKey(ChildState)); IFrameNodeStateView StateView = context.StateView; IFrameNodeStateView ChildStateView = (IFrameNodeStateView)StateViewTable[ChildState]; Debug.Assert(ChildStateView.RootCellView == null); context.SetChildStateView(ChildStateView); ChildStateView.BuildRootCellView(context); context.RestoreParentStateView(StateView); Debug.Assert(ChildStateView.RootCellView != null); IFrameContainerCellView FrameCellView = CreateFrameCellView(context.StateView, EmbeddingCellView, ChildStateView); ValidateContainerCellView(context.StateView, EmbeddingCellView, ChildStateView, FrameCellView); ChildStateView.SetContainerCellView(FrameCellView); CellViewList.Add(FrameCellView); } AssignEmbeddingCellView(context.StateView, EmbeddingCellView); return(EmbeddingCellView); }
/// <summary> /// Create cells for the provided state view. /// </summary> /// <param name="context">Context used to build the cell view tree.</param> /// <param name="parentCellView">The collection of cell views containing this view. Null for the root of the cell tree.</param> public virtual IFrameCellView BuildBlockCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView) { IFrameBlockStateView BlockStateView = context.BlockStateView; IFrameBlockState BlockState = BlockStateView.BlockState; Debug.Assert(BlockState != null); IFrameBlockTemplate BlockTemplate = ParentTemplate as IFrameBlockTemplate; Debug.Assert(BlockTemplate != null); IFrameStateViewDictionary StateViewTable = context.ControllerView.StateViewTable; IFrameCellViewList CellViewList = CreateCellViewList(); IFrameCellViewCollection EmbeddingCellView = CreateEmbeddingCellView(context.StateView, parentCellView, CellViewList); ValidateEmbeddingCellView(context, EmbeddingCellView); foreach (IFrameNodeState ChildState in BlockState.StateList) { Debug.Assert(StateViewTable.ContainsKey(ChildState)); IFrameNodeStateView StateView = context.StateView; IFrameNodeStateView ChildStateView = StateViewTable[ChildState]; Debug.Assert(ChildStateView.RootCellView == null); context.SetChildStateView(ChildStateView); ChildStateView.BuildRootCellView(context); context.RestoreParentStateView(StateView); Debug.Assert(ChildStateView.RootCellView != null); IFrameContainerCellView FrameCellView = CreateFrameCellView(context.StateView, EmbeddingCellView, ChildStateView); ValidateContainerCellView(context.StateView, EmbeddingCellView, ChildStateView, FrameCellView); ChildStateView.SetContainerCellView(FrameCellView); CellViewList.Add(FrameCellView); } AssignEmbeddingCellView(BlockStateView, EmbeddingCellView); return(EmbeddingCellView); }
private protected virtual IFrameCellView BuildPlaceholderCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView, IFrameNodeState childState, IFramePlaceholderFrame frame) { FrameNodeStateViewDictionary StateViewTable = context.ControllerView.StateViewTable; Debug.Assert(StateViewTable.ContainsKey(childState)); IFrameNodeStateView StateView = context.StateView; IFrameNodeStateView ChildStateView = (IFrameNodeStateView)StateViewTable[childState]; Debug.Assert(ChildStateView.RootCellView == null); context.SetChildStateView(ChildStateView); ChildStateView.BuildRootCellView(context); context.RestoreParentStateView(StateView); Debug.Assert(ChildStateView.RootCellView != null); IFrameContainerCellView Result = CreateFrameCellView(context.StateView, parentCellView, ChildStateView, frame); ChildStateView.SetContainerCellView(Result); return(Result); }
/// <summary> /// Create cells for the provided state view. /// </summary> /// <param name="context">Context used to build the cell view tree.</param> /// <param name="parentCellView">The parent cell view.</param> public virtual IFrameCellView BuildNodeCells(IFrameCellViewTreeContext context, IFrameCellViewCollection parentCellView) { IFrameNodeState State = context.StateView.State; Debug.Assert(State != null); Debug.Assert(State.InnerTable != null); Debug.Assert(State.InnerTable.ContainsKey(PropertyName)); IFramePlaceholderInner <IFrameBrowsingPlaceholderNodeIndex> Inner = State.InnerTable[PropertyName] as IFramePlaceholderInner <IFrameBrowsingPlaceholderNodeIndex>; Debug.Assert(Inner != null); Debug.Assert(Inner.ChildState != null); IFrameNodeState ChildState = Inner.ChildState; IFrameStateViewDictionary StateViewTable = context.ControllerView.StateViewTable; Debug.Assert(StateViewTable.ContainsKey(ChildState)); IFrameNodeStateView StateView = context.StateView; IFrameNodeStateView ChildStateView = StateViewTable[ChildState]; Debug.Assert(ChildStateView.RootCellView == null); context.SetChildStateView(ChildStateView); ChildStateView.BuildRootCellView(context); context.RestoreParentStateView(StateView); Debug.Assert(ChildStateView.RootCellView != null); IFrameContainerCellView EmbeddingCellView = CreateFrameCellView(context.StateView, parentCellView, ChildStateView); ValidateContainerCellView(context.StateView, parentCellView, ChildStateView, EmbeddingCellView); ChildStateView.SetContainerCellView(EmbeddingCellView); AssignEmbeddingCellView(context.StateView, EmbeddingCellView); return(EmbeddingCellView); }