Skip to main content

TextPageBand Class

Definition​

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

A page band at the text-model level: a nested Avalonia.Controls.Documents.TextModel.TextDocument with the role and rule that place it and the identity a section's references name. The owning document keeps its bands in Avalonia.Controls.Documents.TextModel.TextDocument.PageBands, snapshots them with itself, and restores them from a snapshot; the Avalonia.Controls.Documents.PageBand element is the optional facade over one of these, the way Avalonia.Controls.Documents.FlowDocument is over a text document.

public class TextPageBand

Inheritance: object -> TextPageBand

Constructors​

NameDescription
TextPageBand (3 overloads)Initializes a band over a new empty band document with a fresh identity.

TextPageBand overloads​

TextPageBand Constructor​

Initializes a band over a new empty band document with a fresh identity.

public TextPageBand(Avalonia.Controls.Documents.PageBandRole role, Avalonia.Controls.Documents.PageBandRule rule)
Parameters​

role Avalonia.Controls.Documents.PageBandRole

rule Avalonia.Controls.Documents.PageBandRule

TextPageBand Constructor​

Initializes a band over document, a band-rooted document, with a fresh identity.

public TextPageBand(Avalonia.Controls.Documents.TextModel.TextDocument document, Avalonia.Controls.Documents.PageBandRole role, Avalonia.Controls.Documents.PageBandRule rule)
Parameters​

document Avalonia.Controls.Documents.TextModel.TextDocument

role Avalonia.Controls.Documents.PageBandRole

rule Avalonia.Controls.Documents.PageBandRule

TextPageBand Constructor​

Initializes a band over document with a known identity (a restored snapshot).

public TextPageBand(Guid id, Avalonia.Controls.Documents.TextModel.TextDocument document, Avalonia.Controls.Documents.PageBandRole role, Avalonia.Controls.Documents.PageBandRule rule)
Parameters​

id Guid

document Avalonia.Controls.Documents.TextModel.TextDocument

role Avalonia.Controls.Documents.PageBandRole

rule Avalonia.Controls.Documents.PageBandRule

Properties​

NameDescription
DocumentThe band's content.
IdThe band's identity, kept through snapshots and clones: what a section's references name.
NameThe band's name, when the source format named it; null otherwise. Formats that reference bands by name rather than by identity write it back on save, so a document loaded and saved keeps the names it arrived with.
OwnerThe document that owns the band, null while it is unowned.
RoleWhether the band is a header or a footer.
RuleWhich pages the band claims by itself; see Avalonia.Controls.Documents.PageBandRule.

Document Property​

The band's content.

public Avalonia.Controls.Documents.TextModel.TextDocument Document { get; set; }

Id Property​

The band's identity, kept through snapshots and clones: what a section's references name.

public Guid Id { get; set; }

Name Property​

The band's name, when the source format named it; null otherwise. Formats that reference bands by name rather than by identity write it back on save, so a document loaded and saved keeps the names it arrived with.

public string Name { get; set; }

Owner Property​

The document that owns the band, null while it is unowned.

public Avalonia.Controls.Documents.TextModel.TextDocument Owner { get; set; }

Role Property​

Whether the band is a header or a footer.

public Avalonia.Controls.Documents.PageBandRole Role { get; set; }

Rule Property​

Which pages the band claims by itself; see Avalonia.Controls.Documents.PageBandRule.

public Avalonia.Controls.Documents.PageBandRule Rule { get; set; }

Events​

NameDescription
ChangedRaised when the role or rule changes.

Changed Event​

Raised when the role or rule changes.

public event EventHandler Changed