ToElement() public method

public ToElement ( ) : OpenXmlElement
return OpenXmlElement
Esempio n. 1
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;
        }
Esempio n. 3
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);
        }
Esempio n. 4
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;
        }