TextPageBand Class
Definition
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
Constructors
| Name | Description |
|---|---|
| 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
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
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
Properties
| Name | Description |
|---|---|
| Document | The band's content. |
| Id | The band's identity, kept through snapshots and clones: what a section's references name. |
| Name | 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. |
| Owner | The document that owns the band, null while it is unowned. |
| Role | Whether the band is a header or a footer. |
| Rule | Which 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
| Name | Description |
|---|---|
| Changed | Raised when the role or rule changes. |
Changed Event
Raised when the role or rule changes.
public event EventHandler Changed