DocumentFormatting Struct
Definition
Document-level formatting snapshot. Value type for zero-reference safety.
public struct DocumentFormatting
Remarks
Contains format-agnostic page-level properties that apply to the entire document. Format-specific details (header/footer margins, gutter, etc.) are stored in format-specific metadata on the root Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.
All measurements are in device-independent pixels (DIPs) to match Avalonia conventions.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| ToString | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting other)
Parameters
other Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
ToString Method
public string ToString()
Returns
string
Properties
| Name | Description |
|---|---|
| Default | Default formatting with no explicit values set. |
| FootnoteNumberFormat | How the document numbers its footnotes. The anchor texts in the snapshot are already in this format. Maps to DOCX w:footnotePr/w:numFmt in the settings and to the RTF \ftnn* keywords. |
| IsPageHeightFixed | True when Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting.PageHeight is an explicit fixed value. False means height is auto/resolved from runtime view geometry. |
| IsPageWidthFixed | True when Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting.PageWidth is an explicit fixed value. False means width is auto/resolved from runtime view geometry. |
| PageBandDistance | Distance from the sheet edge to a page band in device-independent pixels: the header's top sits this far below the sheet top, the footer's bottom this far above the sheet bottom. Null means the document declares none and Avalonia.Controls.Documents.PageBandPolicy.DefaultDistance applies. Maps to DOCX w:pgMar/@w:header and @w:footer and to RTF \headery and \footery. |
| PageHeight | Page height in device-independent pixels. Null means not explicitly known. |
| PagePadding | Page padding (content margins) in device-independent pixels. Maps to page margins in DOCX (w:pgMar) and RTF (\margl, \margr, \margt, \margb). Null means not explicitly set (use application defaults). |
| PageWidth | Page width in device-independent pixels. Null means not explicitly known. |
Default Property
Default formatting with no explicit values set.
public Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting Default { get; set; }
FootnoteNumberFormat Property
How the document numbers its footnotes. The anchor texts in the snapshot are
already in this format. Maps to DOCX w:footnotePr/w:numFmt in the
settings and to the RTF \ftnn* keywords.
public Avalonia.Controls.Documents.FootnoteNumberFormat FootnoteNumberFormat { get; set; }
IsPageHeightFixed Property
True when Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting.PageHeight is an explicit fixed value. False means height is auto/resolved from runtime view geometry.
public bool IsPageHeightFixed { get; set; }
IsPageWidthFixed Property
True when Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting.PageWidth is an explicit fixed value. False means width is auto/resolved from runtime view geometry.
public bool IsPageWidthFixed { get; set; }
PageBandDistance Property
Distance from the sheet edge to a page band in device-independent pixels: the
header's top sits this far below the sheet top, the footer's bottom this far
above the sheet bottom. Null means the document declares none and
Avalonia.Controls.Documents.PageBandPolicy.DefaultDistance applies. Maps to DOCX
w:pgMar/@w:header and @w:footer and to RTF \headery and
\footery.
public Nullable<double> PageBandDistance { get; set; }
Remarks
A band taller than the space this leaves pushes the body down, so the value decides where pages break. Screen, print and PDF all read it from here: a distance held by a view would break the same document on different lines.
PageHeight Property
Page height in device-independent pixels. Null means not explicitly known.
public Nullable<double> PageHeight { get; set; }
PagePadding Property
Page padding (content margins) in device-independent pixels.
Maps to page margins in DOCX (w:pgMar) and RTF
(\margl, \margr, \margt, \margb).
Null means not explicitly set (use application defaults).
public Nullable<Avalonia.Thickness> PagePadding { get; set; }
PageWidth Property
Page width in device-independent pixels. Null means not explicitly known.
public Nullable<double> PageWidth { get; set; }