internal override Component Clone(bool deep) { if (NeedsDelayIniting) { DoDelayedInit(); } Layout layout = Ribbon.CreateLayout("clonedLayout-" + Ribbon.GetUniqueNumber(), this.Title); if (!deep) { return(layout); } foreach (Section section in Children) { Section clonedSection = (Section)section.Clone(deep); layout.AddChild(clonedSection); } return(layout); }
internal void FillLayout(object data, Layout layout, DeclarativeTemplateBuildContext bc) { JSObject[] children = DataNodeWrapper.GetNodeChildren(data); int sectionCounter = 0; for (int i = 0; i < children.Length; i++) { string name = DataNodeWrapper.GetNodeName(children[i]); if (name == DataNodeWrapper.SECTION) { Section section = CreateSectionFromData(children[i], bc, layout, sectionCounter++); layout.AddChild(section); } else { // This must be an <OverflowSection> sectionCounter = HandleOverflow(children[i], bc, layout, sectionCounter); } } }