Class DocumentFragment
Formatted content to insert at a position: a standalone document holding the content and the definitions it uses (styles, lists, notes, media, link targets), and whether its last paragraph's mark is part of it. Made by ExtractFragment(WordDocument, DocumentSpan) (copy) or by FromDocument(WordDocument, bool) from a document any reader produced (HTML from a clipboard, a DOCX, RTF …). Owns its document.
public sealed class DocumentFragment : IDisposable
- Inheritance
-
DocumentFragment
- Implements
- Inherited Members
Properties
- Document
Gets the document holding the content: its sections' blocks, in order, are the fragment.
- EndsWithParagraphMark
Gets a value indicating whether the last paragraph's mark is part of the fragment. When it is not, the last paragraph's content joins the paragraph the fragment goes into and takes that paragraph's properties, as in Word: a paragraph's properties travel with its mark.
Methods
- FromDocument(WordDocument, bool)
Makes a fragment of a whole document, taking ownership of it.