/// <summary>
        /// Create cells for the provided state view.
        /// </summary>
        /// <param name="context">Context used to build the cell view tree.</param>
        public virtual IFrameCellView BuildNodeCells(IFrameCellViewTreeContext context)
        {
            IFrameNodeFrame NodeFrame = Root as IFrameNodeFrame;

            Debug.Assert(NodeFrame != null);

            return(NodeFrame.BuildNodeCells(context, null));
        }
Example #2
0
        /// <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)
        {
            FrameCellViewList        CellViewList      = CreateCellViewList();
            IFrameCellViewCollection EmbeddingCellView = CreateEmbeddingCellView(context.StateView, parentCellView, CellViewList);

            ValidateEmbeddingCellView(context, EmbeddingCellView);

            foreach (IFrameFrame Item in Items)
            {
                IFrameNodeFrame NodeFrame = Item as IFrameNodeFrame;
                Debug.Assert(NodeFrame != null);

                IFrameCellView ItemCellView = NodeFrame.BuildNodeCells(context, EmbeddingCellView);

                // Only add cell views that are not empty and that are not empty collections.
                if (!(ItemCellView is IFrameEmptyCellView) && !(ItemCellView is IFrameCellViewCollection AsCollection && AsCollection.CellViewList.Count == 0 && !AsCollection.IsAssignedToTable))
                {
                    CellViewList.Add(ItemCellView);
                }
            }

            return(EmbeddingCellView);
        }