Inheritance: DocxDocumentContextBuilderBase
        public void Cell(Action <IDocumentContextBuilder> content)
        {
            var documentContextBuilder = new DocxDocumentParagraphContextBuilder(Document, null, null);

            content(documentContextBuilder);

            Aggregation.AddRange(documentContextBuilder.Aggregation);
        }
Example #2
0
        public IDocumentOrderedListBuilder Item(Action <IDocumentContextBuilder> options)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, CreateParagraphProperties(), null);

            options(builder);

            var paragraph = builder.ToElement();

            Aggregation.Add(paragraph);

            return(this);
        }
        public IDocumentOrderedListBuilder Item(Action<IDocumentContextBuilder> options)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, CreateParagraphProperties(), null);

            options(builder);

            var paragraph = builder.ToElement();

            Aggregation.Add(paragraph);

            return this;
        }
Example #4
0
        public IDocumentTagContextBuilder EmptyLine(int count)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, null, null);

            for (int i = 0; i < count; i++)
            {
                AppendElements(builder.ToElement());
            }

            SaveDocument();

            return(this);
        }
Example #5
0
        public IDocumentTagContextBuilder Paragraph(Action <IDocumentContextBuilder> options)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, _contextParagraphProperties, _contextParagraphPrependedElements);

            options(builder);

            AppendElements(builder.ToElement());

            SaveDocument();

            _contextParagraphProperties        = null;
            _contextParagraphPrependedElements = null;

            return(this);
        }
        public IDocumentTagContextBuilder Paragraph(Action<IDocumentContextBuilder> options)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, _contextParagraphProperties, _contextParagraphPrependedElements);

            options(builder);

            AppendElements(builder.ToElement());

            SaveDocument();

            _contextParagraphProperties = null;
            _contextParagraphPrependedElements = null;

            return this;
        }
        public IDocumentTagContextBuilder EmptyLine(int count)
        {
            var builder = new DocxDocumentParagraphContextBuilder(Document, null, null);

            for (int i = 0; i < count; i++)
                AppendElements(builder.ToElement());

            SaveDocument();

            return this;
        }