/// <summary>
        /// Gets the frame that creates cells associated to states in the inner.
        /// </summary>
        /// <param name="inner">The inner.</param>
        public virtual IFrameFrame InnerToFrame(IFrameInner <IFrameBrowsingChildIndex> inner)
        {
            // Call overloads of this method if they exist.
            ControllerTools.AssertNoOverride(this, Type.FromTypeof <FrameTemplateSet>());

            IFrameNodeState Owner     = inner.Owner;
            Type            OwnerType = Type.FromGetType(Owner.Node);

            //Type InterfaceType = NodeTreeHelper.NodeTypeToInterfaceType(OwnerType);
            //IFrameNodeTemplate Template = NodeTypeToTemplate(InterfaceType);
            IFrameNodeTemplate Template = NodeTypeToTemplate(OwnerType);

            IFrameFrame Frame = Template.PropertyToFrame(inner.PropertyName);

            if (Frame is IFrameBlockListFrame AsBlockListFrame)
            {
                IFrameBlockListInner <IFrameBrowsingBlockNodeIndex> BlockListInner = inner as IFrameBlockListInner <IFrameBrowsingBlockNodeIndex>;
                Debug.Assert(BlockListInner != null);

                Type BlockType = NodeTreeHelperBlockList.BlockListBlockType(Owner.Node, BlockListInner.PropertyName);
                IFrameBlockTemplate BlockTemplate = BlockTypeToTemplate(BlockType);

                Frame = BlockTemplate.GetPlaceholderFrame();
            }

            return(Frame);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the frame that creates cells associated to a property in a state.
        /// </summary>
        /// <param name="state">The state.</param>
        /// <param name="propertyName">The property name.</param>
        public virtual IFrameFrame PropertyToFrame(IFrameNodeState state, string propertyName)
        {
            // Call overloads of this method if they exist.
            ControllerTools.AssertNoOverride(this, typeof(FrameTemplateSet));

            Type OwnerType              = state.Node.GetType();
            Type InterfaceType          = NodeTreeHelper.NodeTypeToInterfaceType(OwnerType);
            IFrameNodeTemplate Template = NodeTypeToTemplate(InterfaceType);
            IFrameFrame        Frame    = Template.PropertyToFrame(propertyName);

            return(Frame);
        }