Exemplo n.º 1
0
        public void Reflow(DrawContext dc, BoundingContext bounds, bool incremental)
        {
            reflowCompleted = true;

            // TODO: L: do something with item metrics?
            ItemMetrics im;

            startTag = new StartTag(this, elementNode);
            startTag.Compose(dc, style, out im);

            endTag = new EndTag(this, elementNode);
            endTag.Compose(dc, style, out im);

            ParentTable.InitRow(dc, startTag, endTag, bounds);

            cells.Clear();
            foreach (XmlNode n in elementNode.ChildNodes)
            {
                XmlElement e = n as XmlElement;
                if (e == null)
                {
                    continue;
                }

                Table.CellInfo ci = ParentTable[e];
                TableCell      c  = ci.Cell;
                cells.Add(c);
                BoundingContext newBounds = new BoundingContext(bounds, ci.Column.Width);
                c.Parent = this;
                c.Reflow(dc, newBounds, false);
                ParentTable.Update(c);
            }

            RecalcBounds();
        }