Class DocxStyle
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
A style the document uses. RunFormat and ParagraphFormat are resolved through its based-on chain.
public sealed record DocxStyle : IEquatable<DocxStyle>
- Inheritance
-
DocxStyle
- Implements
- Inherited Members
Properties
BasedOn
The id of the style this one is based on, or null when it isn't based on another.
public string? BasedOn { get; init; }
Property Value
Id
The style's id, such as "Heading1", which paragraphs, runs and tables refer to it by.
public required string Id { get; init; }
Property Value
IsDefault
Whether this is the style used when none is named.
public bool IsDefault { get; init; }
Property Value
Name
The style's name as the file stores it, such as "heading 1", or null when it has none.
public string? Name { get; init; }
Property Value
Other
A hash of the style's own run, paragraph and table formatting PDiffy doesn't read, such as w:kern or w:widowControl, 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
ParagraphFormat
How a paragraph style lays out paragraphs, document defaults included; empty for other kinds of style.
public DocxParagraphFormat ParagraphFormat { get; init; }
Property Value
RunFormat
How the style's text looks: for a character style, its settings and those of the styles it's based on; for any other style, the document defaults with those on top.
public DocxRunFormat RunFormat { get; init; }
Property Value
Type
"paragraph", "character", "table" or "numbering", as in DocxStyleTypes.
public required string Type { get; init; }