Table of Contents

Method ApplyFormatting

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

ApplyFormatting(Paragraph, ParagraphFormat)

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

public static Paragraph ApplyFormatting(this Paragraph paragraph, ParagraphFormat formatting)

Parameters

paragraph Paragraph

The paragraph.

formatting ParagraphFormat

The values to apply.

Returns

Paragraph

The same paragraph, so calls chain.

Exceptions

ArgumentNullException

An argument is null.

ApplyFormatting(RunContentInline, CharacterFormat)

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

public static RunContentInline ApplyFormatting(this RunContentInline inline, CharacterFormat formatting)

Parameters

inline RunContentInline

The run-content inline.

formatting CharacterFormat

The values to apply.

Returns

RunContentInline

The same inline, so calls chain.

Exceptions

ArgumentNullException

An argument is null.

ApplyFormatting(DocumentRange, CharacterFormat)

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

public static int ApplyFormatting(this DocumentRange range, CharacterFormat formatting)

Parameters

range DocumentRange

The range.

formatting CharacterFormat

The values to apply.

Returns

int

The number of inlines the formatting was applied to.

Exceptions

ArgumentNullException

An argument is null.

ApplyFormatting(DocumentRange, ParagraphFormat)

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

public static int ApplyFormatting(this DocumentRange range, ParagraphFormat formatting)

Parameters

range DocumentRange

The range.

formatting ParagraphFormat

The values to apply.

Returns

int

The number of paragraphs the formatting was applied to.

Exceptions

ArgumentNullException

An argument is null.