Class DocxParagraphFormat
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
How a paragraph is laid out. Lengths are in points; null means not set.
public sealed record DocxParagraphFormat : IEquatable<DocxParagraphFormat>
- Inheritance
-
DocxParagraphFormat
- Implements
- Inherited Members
Properties
Alignment
"left", "center", "right", "both" (justified) and so on, as Word writes it; DocxAlignments lists them.
public string? Alignment { get; init; }
Property Value
Borders
Borders around the paragraph, one per side it has.
public IReadOnlyList<DocxBorder> Borders { get; init; }
Property Value
FirstLine
How much further the first line is indented than the rest; null when it hangs instead.
public double? FirstLine { get; init; }
Property Value
Hanging
How far the first line sticks out to the left of the rest; null when it's indented instead.
public double? Hanging { get; init; }
Property Value
HeadingLevel
The heading level from 1, when the paragraph is a heading.
public int? HeadingLevel { get; init; }
Property Value
- int?
IndentLeft
How far the paragraph is indented from the left margin.
public double? IndentLeft { get; init; }
Property Value
IndentRight
How far the paragraph is indented from the right margin.
public double? IndentRight { get; init; }
Property Value
KeepLines
Whether all the paragraph's lines are kept on one page.
public bool KeepLines { get; init; }
Property Value
KeepNext
Whether the paragraph is kept on the same page as the one after it.
public bool KeepNext { get; init; }
Property Value
LineSpacing
Line spacing: a multiple such as 1.15, or a length with its rule, such as exactly 12 points.
public DocxLineSpacing? LineSpacing { get; init; }
Property Value
Other
A hash of the paragraph's own formatting PDiffy doesn't read, such as w:widowControl or w:contextualSpacing, so changing it changes the snapshot; null when it has none. Only its own formatting counts, not what it inherits, and noise Word writes everywhere is left out.
public string? Other { get; init; }
Property Value
PageBreakBefore
Whether the paragraph starts on a new page.
public bool PageBreakBefore { get; init; }
Property Value
RightToLeft
Whether the paragraph is set right to left, as in Arabic or Hebrew.
public bool RightToLeft { get; init; }
Property Value
Shading
The paragraph's fill color in hex.
public string? Shading { get; init; }
Property Value
SpacingAfter
The space below the paragraph.
public double? SpacingAfter { get; init; }
Property Value
SpacingBefore
The space above the paragraph.
public double? SpacingBefore { get; init; }
Property Value
Tabs
Custom tab stops, such as a right tab at 468 points with dots before it.
public IReadOnlyList<DocxTabStop> Tabs { get; init; }