public Container(Container b, bool copyChildren) : this(b) { if (copyChildren) { foreach (Element e in b._childElements) { Element newElement = null; if (e is FixedContainer) { newElement = new FixedContainer((FixedContainer)e, true); } if (e is FlowContainer) { newElement = new FlowContainer((FlowContainer)e, true); } if (e is TextElement) { newElement = new TextElement((TextElement)e); } if (e is ImageElement) { newElement = new ImageElement((ImageElement)e); } newElement.Parent = this; _childElements.Add(newElement); } } }
internal FixedContainer AddFixedContainer() { FixedContainer b = new FixedContainer(null, null, null); _childElements.Add(b); return(b); }
internal FixedContainer AddFixedContainer(RdlEngine.ReportElement reportElement, RdlEngine.Style style) { FixedContainer child = new FixedContainer(this, reportElement, new BoxStyle(style)); _childElements.Add(child); return(child); }
internal Page(decimal width, decimal height, decimal relativeTop, Container breakAt, ref Container currentPos) { _pageBox = new PageElement(); _pageBox.Width = width; _pageBox.Height = height; _pageBox.CanGrowVertically = false; _pageBox.Name = "Page"; if (breakAt != null) { _pageBox.BaseStyleList = breakAt.BaseStyleList; } _relativeTop = relativeTop; _pageHeaderBox = _pageBox.AddFixedContainer(); _pageHeaderBox.Width = _pageBox.Width; _pageHeaderBox.Name = "PageHeader"; if (breakAt != null) { _pageHeaderBox.BaseStyleList = breakAt.BaseStyleList; } _pageHeaderBox.CanGrowVertically = false; _pageDetailsBox = _pageBox.AddFixedContainer(); _pageDetailsBox.Width = _pageBox.Width; _pageDetailsBox.Height = _pageBox.Height; _pageDetailsBox.Name = "PageDetails"; if (breakAt != null) { _pageDetailsBox.BaseStyleList = breakAt.BaseStyleList; } _pageDetailsBox.CanGrowVertically = false; _pageFooterBox = _pageBox.AddFixedContainer(); _pageFooterBox.Width = _pageBox.Width; _pageFooterBox.Name = "PageFooter"; _pageFooterBox.CanGrowVertically = false; if (breakAt != null) { AddHeaders(breakAt); _pageDetailsBox.Height = _pageBox.Height - _pageHeaderBox.Height - _pageFooterBox.Height; _pageDetailsBox.Top = _pageHeaderBox.Height; } currentPos = AddParentBoxes(breakAt, _pageDetailsBox); }