Skip to main content

PageBandPolicy Class

Definition​

Assembly:Avalonia.Controls.Documents
Package:Avalonia.Controls.Documents

The shared rule for which band a page shows, applied by the paged view over the text model and mirrored by the PDF export over snapshots. Explicit first, then rules, then the running band: a section's first-page reference on the section's first page; else the document's Avalonia.Controls.Documents.PageBandRule.FirstPage band on page one, else its Avalonia.Controls.Documents.PageBandRule.EvenPage band on even pages; else the section's running reference, else the document's Avalonia.Controls.Documents.PageBandRule.Default band. A rule without a band for a role does not blank the page: the running band applies. What resolves to nothing shows nothing.

public class PageBandPolicy

Inheritance: object -> PageBandPolicy

Methods​

NameDescription
ResolveResolves the band element for role on page pageNumber (one-based), whose content belongs to section (null for root content) and which starts that section when isSectionFirstPage.

Resolve Method​

Resolves the band element for role on page pageNumber (one-based), whose content belongs to section (null for root content) and which starts that section when isSectionFirstPage.

public Avalonia.Controls.Documents.PageBand Resolve(Avalonia.Controls.Documents.FlowDocument document, Avalonia.Controls.Documents.Section section, Avalonia.Controls.Documents.PageBandRole role, bool isSectionFirstPage, int pageNumber)

Parameters​

document Avalonia.Controls.Documents.FlowDocument

section Avalonia.Controls.Documents.Section

role Avalonia.Controls.Documents.PageBandRole

isSectionFirstPage bool

pageNumber int

Returns​

Avalonia.Controls.Documents.PageBand

Fields​

NameDescription
DefaultDistanceThe distance between the page edge and a band when nothing specifies one: 12.5 mm, about half an inch, the common word-processor default.

DefaultDistance Field​

The distance between the page edge and a band when nothing specifies one: 12.5 mm, about half an inch, the common word-processor default.

public double DefaultDistance