• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class Section

Represents a document section and its stories and page settings.

Inheritance
object
Node
CompositeNode
Section
Implements
IEnumerable<Node>
IEnumerable
Inherited Members
CompositeNode.ChildNodes
CompositeNode.GetAllChildNodes()
CompositeNode.Count
CompositeNode.FirstChild
CompositeNode.HasChildNodes
CompositeNode.IsComposite
CompositeNode.LastChild
CompositeNode.GetEnumerator()
Node.Document
Node.NextSibling
Node.ParentNode
Node.PreviousSibling
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Document
Assembly: DRIT.Document.dll
Syntax
public class Section : CompositeNode, IEnumerable<Node>, IEnumerable

Constructors

Section()

Initializes an empty section with a body and default page settings.

Declaration
public Section()

Properties

Body

Gets the main story body for this section.

Declaration
public Body Body { get; }
Property Value
Type Description
Body

HeadersFooters

Gets the headers and footers associated with this section.

Declaration
public HeaderFooterCollection HeadersFooters { get; }
Property Value
Type Description
HeaderFooterCollection

NodeType

Gets the node type, which is always Section.

Declaration
public override NodeType NodeType { get; }
Property Value
Type Description
NodeType
Overrides
Node.NodeType

PageSetup

Gets the page and section layout settings.

Declaration
public PageSetup PageSetup { get; }
Property Value
Type Description
PageSetup

ProtectedForForms

Gets or sets a value indicating whether this section is protected for filling in forms. Maps to <w:formProt/> in the section properties.

Declaration
public bool ProtectedForForms { get; set; }
Property Value
Type Description
bool

SectionPropertiesRevision

Gets or sets the tracked revision for this section's properties.

Declaration
public SectionPropertiesRevision SectionPropertiesRevision { get; set; }
Property Value
Type Description
SectionPropertiesRevision

TableOfContents

The table of contents for this section. Never null. Use UpdateTableOfContents() to populate the entries from the document headings.

Declaration
public TableOfContents TableOfContents { get; }
Property Value
Type Description
TableOfContents

Methods

AddHeaderFooter(HeaderFooterType)

Adds a header or footer of the specified type.

Declaration
public HeaderFooter AddHeaderFooter(HeaderFooterType headerFooterType)
Parameters
Type Name Description
HeaderFooterType headerFooterType

The header or footer type to add.

Returns
Type Description
HeaderFooter

The newly added header or footer.

AddParagraph(string)

Adds a paragraph to the end of the section body.

Declaration
public Paragraph AddParagraph(string text = null)
Parameters
Type Name Description
string text

Optional initial paragraph text.

Returns
Type Description
Paragraph

The newly added paragraph.

SetWatermark(Watermark)

Sets a watermark (text or picture) on the primary header of this section. The watermark appears behind the body text on every page.

Declaration
public void SetWatermark(Watermark watermark)
Parameters
Type Name Description
Watermark watermark

The watermark to apply.

Implements

IEnumerable<T>
IEnumerable
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX