Esempio n. 1
0
        /// <summary>
        /// Builds the cell view tree for this view.
        /// </summary>
        /// <param name="context">Context used to build the cell view tree.</param>
        public virtual void BuildRootCellView(IFrameCellViewTreeContext context)
        {
            Debug.Assert(context.StateView == this);

            IOptionalReference Optional = State.Optional;

            Debug.Assert(Optional != null);

            InitCellViewTable(true);

            Debug.Assert(RootCellView == null);

            IFrameCellView CellView;

            if (Optional.IsAssigned)
            {
                IFrameNodeTemplate NodeTemplate = Template as IFrameNodeTemplate;
                Debug.Assert(NodeTemplate != null);

                CellView = NodeTemplate.BuildNodeCells(context);
            }
            else
            {
                IFrameEmptyCellView EmptyCellView = CreateEmptyCellView(this, null);
                ValidateEmptyCellView(context, EmptyCellView);

                CellView = EmptyCellView;
            }

            SetRootCellView(CellView);
            SealCellViewTable();
        }
        /// <summary>
        /// Builds the cell view tree for this view.
        /// </summary>
        /// <param name="context">Context used to build the cell view tree.</param>
        public virtual void BuildRootCellView(IFrameCellViewTreeContext context)
        {
            Debug.Assert(context.StateView == this);
            Debug.Assert(RootCellView == null);

            InitCellViewTable();

            IFrameNodeTemplate NodeTemplate = Template as IFrameNodeTemplate;
            Debug.Assert(NodeTemplate != null);

            SetRootCellView(NodeTemplate.BuildNodeCells(context));

            SealCellViewTable();
        }