Table of Contents

Class StyleEditingExtensions

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

Applies styles and direct formatting to paragraphs, runs and ranges.

Formatting is layered with the model's own OverlayOnto, which copies only the values a bag actually specifies. Applying new CharacterFormat { Bold = true } therefore sets bold and touches nothing else — it does not stamp the rest of the bag with defaults, and everything left null keeps inheriting from the style chain.

A style id is validated against the document's style table before it is written. A dangling reference is not a harmless no-op: the resolver reports DXP1002 and silently resolves without it, so the caller would see formatting that never arrives.

public static class StyleEditingExtensions
Inheritance
StyleEditingExtensions
Inherited Members

Methods

ApplyFormatting(DocumentRange, CharacterFormat)

Layers direct run formatting onto every run-content inline in a range, recursing into nested content.

ApplyFormatting(DocumentRange, ParagraphFormat)

Layers direct paragraph formatting onto every paragraph in a range, including paragraphs nested inside tables and content controls.

ApplyFormatting(Paragraph, ParagraphFormat)

Layers direct paragraph formatting onto a paragraph. Only the values formatting specifies are written.

ApplyFormatting(RunContentInline, CharacterFormat)

Layers direct run formatting onto one run-content inline. Only the values formatting specifies are written.

ApplyStyle(DocumentRange, string)

Applies a character style to every run-content inline in a range, recursing into nested content.

ApplyStyle(Paragraph, string)

Applies a paragraph style.

ApplyStyle(RunContentInline, string)

Applies a character style to one run-content inline.