Skip to main content

DocumentSnapshotBuilder Class

Definition​

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

Builder for creating DocumentSnapshot instances without FlowDocument dependencies. Provides a fluent API for constructing snapshot content.

public class DocumentSnapshotBuilder

Inheritance: object -> DocumentSnapshotBuilder

Methods​

NameDescription
AddBoldAdds bold text to the current paragraph.
AddFootnoteAdds a footnote - a nested document snapshot, built with its own builder - paired with the Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnoteReference(int) anchor of the same noteId. label is the note's name in a format that addresses notes by name (markdown), or null. Notes are kept in the order added, which readers make the anchor order.
AddFootnoteCitationAdds a further citation of the note noteId already anchored elsewhere: one object replacement character showing that note's number, owning no note of its own. Legal inside a note body, where an anchor is not.
AddFootnoteReferenceAdds a footnote anchor to the current paragraph: one object replacement character, showing the position of its note among the notes when rendered. noteId pairs it with the Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnote(int,Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot,string) body of the same id.
AddHyperlinkAdds a hyperlink to the current paragraph.
AddImageNo summary available.
AddImageReferenceAdds an inline image that references an external source (e.g. a URL) instead of embedding pixel bytes. The pixels are resolved at render time by a loader; the document stores only the reference.
AddInlineAdds an inline element to the current paragraph.
AddItalicAdds italic text to the current paragraph.
AddListItem (3 overloads)Adds a new empty list item to the current list.
AddPageBandNo summary available.
AddPageBreakApplies an explicit page break at the current position. The break is a split instruction, not content: a paragraph with content ends here and continues in a clone of itself, and the next committed block receives Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting.PageBreakBefore. A block that would commit empty while the break is pending is the break's own remainder (or a break-only carrier paragraph) and is dropped - the break carries forward; at a container boundary or the document end the pending break materializes as an empty flagged landing paragraph.
AddPageNumberFieldAdds a page-number field to the current paragraph. The field's cached result becomes its text content, so plain rendering and export show it until paginated rendering resolves the field per page.
AddParagraph (5 overloads)Adds a new empty paragraph.
AddParagraphRangeRegisters a paragraph that references a range within previously set bulk text. The text at [offset, offset + length) must already exist in the rope via a prior Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.SetBulkText(ReadOnlyMemory{char}) call. No rope insert is performed; only the snapshot node tree is updated.
AddRunNo summary available.
AddText (2 overloads)No summary available.
AddUnderlineAdds underlined text to the current paragraph.
BeginDeferredTableCellsSwitches the current table to deferred finalization: its rows and cells stay editable until Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndTable, so a serializer can set each cell's span (and drop merge continuations) once the whole table and its column grid are known. Applies only to the current table; other tables keep the eager path.
BuildBuilds the DocumentSnapshot.
Create (2 overloads)Creates a new DocumentSnapshotBuilder.
DropDeferredTableCellMarks a deferred cell (a vertical-merge continuation folded into the cell above) so it is not emitted when the table finalizes.
EndContainerEnds the most recent Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartContainer(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind,Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting) and restores the prior container.
EndListEnds the current list and restores the parent list if nested.
EndSectionEnds the current section and adds it as a block to the parent container.
EndTableEnds the current table.
EndTableCellEnds the current table cell.
EndTableRowEnds the current table row.
GetDeferredTableRowCellCountNumber of cells emitted so far in a deferred row, or -1 if that row does not exist. A serializer compares this against its own cell count to confirm it can address the cells before applying spans.
SetBulkTextNo summary available.
SetContainerCustomDataSets Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData on the active block container. Works with sections, generic containers, list items, and table cells.
SetDeferredTableCellSpanSets a deferred cell's column and row span by its row index and its cell index within that row (both in emit order). No-op unless deferral is active.
SetDocumentFormatMetadataSets format-specific metadata for the document root node. Serializers use this to attach round-trip metadata (e.g., DOCX header/footer margins).
SetDocumentFormattingSets document-level formatting (page margins, etc.). Call before or after adding any content; takes effect at Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.Build time.
SetDocumentTextElementFormattingSets the document's default text formatting - the font, size, foreground and background every block and inline inherits unless it declares its own. It travels as the root node's Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.TextElementFormatting.
SetFootnoteNumberFormatSets the footnote numbering format alone, keeping the other document-level formatting; a reader learns the numbering and the page geometry from different places. The anchors added with Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnoteReference(int) render their numbers in that format.
SetListBlockFormattingSets block formatting (e.g. explicit Padding) for the current list container. Only explicitly set properties are stored; auto-computed values (such as the marker column ListNode sizes from the item font) are intentionally omitted and recomputed at render time.
SetListFormatMetadataSets format-specific metadata for the current list. Serializers use this to attach round-trip metadata.
SetListItemFormatMetadataSets format-specific metadata for the current list item. Serializers use this to attach round-trip metadata.
SetListItemFormattingSets formatting for the current list item.
SetListItemTextElementFormattingSets base-level element formatting for the current list item.
SetListMarkerAlignmentSets how the current list's marker is aligned within its column (Word's w:lvlJc): left starts every marker at the same x, right ends them at the same x with a consistent gap to the content. Shared by every item in the list.
SetListMarkerOffsetSets the current list's marker offset (its hanging indent — how far the marker sits back from the item content). Shared by every item in the list.
SetParagraphCustomDataSets Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData on the current paragraph.
SetParagraphFormatMetadataSets format-specific metadata for the current paragraph. Serializers use this to attach round-trip metadata (e.g., RTF twips, DOCX style IDs).
SetParagraphFormattingSets formatting for the current paragraph, or queues it for the next paragraph.
SetParagraphTextElementFormattingSets base-level element formatting for the current paragraph. If no paragraph is active, queues it for the next paragraph.
SetPendingParagraphFormattingQueues paragraph formatting for the next paragraph without affecting the current one.
SetPendingParagraphTextElementFormattingQueues base-level element formatting for the next paragraph without affecting the current one.
SetRootCapacityPre-allocates capacity for the root container based on estimated paragraph count. Reduces array resizes during document construction. Call after SetBulkText when paragraph count can be estimated.
SetRowCustomDataSets extension-specific custom data for the current table row (e.g. the markdown header-row flag).
SetRowFormatMetadataSets format-specific metadata for the current table row. Serializers use this to attach round-trip metadata (e.g., row borders).
SetSectionFormatMetadataSets format-specific round-trip metadata on the section currently open via Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting,Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup). No effect when the active container is not a section.
SetSectionPageBandReferencesSets the current section's page-band references (indices from Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddPageBand(Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot,Avalonia.Controls.Documents.PageBandRole,Avalonia.Controls.Documents.PageBandRule,Guid@,string)).
SetSectionPageSetupSets the page setup of the section currently open via Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting,Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup), replacing any value passed there. For readers whose format declares the setup after the section has started (RTF section control words follow \sect; a DOCX section's sectPr sits on its LAST paragraph). No effect when the active container is not a section.
SetTableBlockFormattingSets block formatting for the current table.
SetTableCellBackgroundSets the background color of the current table cell.
SetTableCellBordersNo summary available.
SetTableCellSpanSets how many grid columns and rows the current table cell spans (Word's w:gridSpan and w:vMerge). Each value is clamped to at least 1; a span of 1 carries nothing, so an un-merged cell stays at the default.
SetTableCellTextElementFormattingSets base-level element formatting for the current table cell.
SetTableCellVerticalAlignmentSets the vertical alignment of the current table cell's content (Word's w:vAlign). Top is the default.
SetTableColumnsNo summary available.
SetTableFormatMetadataSets format-specific metadata for the current table. Serializers use this to attach round-trip metadata (e.g., original column widths).
SetTableInteriorBordersNo summary available.
SetTableRowHeightSets the current table row's minimum height in device-independent pixels (Word's w:trHeight).
SetTableRowTextElementFormattingSets base-level element formatting for the current table row.
StartContainerStarts a generic block container with an arbitrary Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind. Containers nest: calling Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartContainer(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind,Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting) while another is active pushes the outer container onto a stack. Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndContainer pops it. A container opened while a list item or a table cell is open nests inside it - the blocks added to the container are the container's, and the finished container is added back to the item or cell that enclosed it.
StartListStarts a new list with the specified marker style. When called inside an active list item, automatically nests the new list inside the current item instead of finalizing it.
StartNestedListStarts a nested list inside the current list item.
StartSection (2 overloads)Starts a new section container. Blocks added after this call are placed inside the section until Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndSection is called.
StartTableStarts a new table.
StartTableCellStarts a new table cell.
StartTableRowStarts a new table row.

AddBold Method​

Adds bold text to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddBold(string text)

Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddFootnote Method​

Adds a footnote - a nested document snapshot, built with its own builder - paired with the Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnoteReference(int) anchor of the same noteId. label is the note's name in a format that addresses notes by name (markdown), or null. Notes are kept in the order added, which readers make the anchor order.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddFootnote(int noteId, Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot content, string label)

Parameters​

noteId int

content Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot

label string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddFootnoteCitation Method​

Adds a further citation of the note noteId already anchored elsewhere: one object replacement character showing that note's number, owning no note of its own. Legal inside a note body, where an anchor is not.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddFootnoteCitation(int noteId)

Parameters​

noteId int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddFootnoteReference Method​

Adds a footnote anchor to the current paragraph: one object replacement character, showing the position of its note among the notes when rendered. noteId pairs it with the Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnote(int,Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot,string) body of the same id.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddFootnoteReference(int noteId)

Parameters​

noteId int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

Adds a hyperlink to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddHyperlink(string text, string navigateUri)

Parameters​

text string

navigateUri string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddImage Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddImage(ReadOnlyMemory<byte> imageData, string mimeType, double width, double height, string altText)

Parameters​

imageData ReadOnlyMemory<byte>

mimeType string

width double

height double

altText string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddImageReference Method​

Adds an inline image that references an external source (e.g. a URL) instead of embedding pixel bytes. The pixels are resolved at render time by a loader; the document stores only the reference.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddImageReference(string sourceUri, string mimeType, double width, double height, string altText)

Parameters​

sourceUri string

The image reference URI.

mimeType string

The MIME type, when known; defaults to application/octet-stream.

width double

Display width in device-independent pixels; double.NaN uses the intrinsic pixel size.

height double

Display height in device-independent pixels; double.NaN uses the intrinsic pixel size.

altText string

Optional alternative text describing the image.

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddInline Method​

Adds an inline element to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddInline(Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft inline)

Parameters​

inline Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddItalic Method​

Adds italic text to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddItalic(string text)

Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddListItem overloads​

AddListItem Method​

Adds a new empty list item to the current list.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddListItem()
Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddListItem Method​

Adds a new list item with a custom Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind to the current list. The kind must have Avalonia.Controls.Documents.TextModel.NodeKindFlags.Block and Avalonia.Controls.Documents.TextModel.NodeKindFlags.BlockContainer flags.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddListItem(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind kind)
Parameters​

kind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddListItem Method​

Adds a new list item to the current list.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddListItem(string text)
Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddPageBand Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddPageBand(Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot content, Avalonia.Controls.Documents.PageBandRole role, Avalonia.Controls.Documents.PageBandRule rule, Guid& id, string name)

Parameters​

content Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot

role Avalonia.Controls.Documents.PageBandRole

rule Avalonia.Controls.Documents.PageBandRule

id Guid&

name string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddPageBreak Method​

Applies an explicit page break at the current position. The break is a split instruction, not content: a paragraph with content ends here and continues in a clone of itself, and the next committed block receives Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting.PageBreakBefore. A block that would commit empty while the break is pending is the break's own remainder (or a break-only carrier paragraph) and is dropped - the break carries forward; at a container boundary or the document end the pending break materializes as an empty flagged landing paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddPageBreak()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddPageNumberField Method​

Adds a page-number field to the current paragraph. The field's cached result becomes its text content, so plain rendering and export show it until paginated rendering resolves the field per page.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddPageNumberField(Avalonia.Controls.Documents.PageNumberFieldKind fieldKind)

Parameters​

fieldKind Avalonia.Controls.Documents.PageNumberFieldKind

What the field resolves to.

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraph overloads​

AddParagraph Method​

Adds a new empty paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraph()
Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraph Method​

Adds a paragraph with the specified inline elements.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraph(Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft[] inlines)
Parameters​

inlines Avalonia.Controls.Documents.Serialization.Authoring.InlineDraft[]

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraph Method​

Adds a new empty paragraph with a custom Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind. The kind must have the Avalonia.Controls.Documents.TextModel.NodeKindFlags.InlineContainer flag.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraph(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind kind)
Parameters​

kind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraph Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraph(ReadOnlyMemory<char> text)
Parameters​

text ReadOnlyMemory<char>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraph Method​

Adds a new paragraph with the specified text.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraph(string text)
Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddParagraphRange Method​

Registers a paragraph that references a range within previously set bulk text. The text at [offset, offset + length) must already exist in the rope via a prior Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.SetBulkText(ReadOnlyMemory{char}) call. No rope insert is performed; only the snapshot node tree is updated.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddParagraphRange(int offset, int length)

Parameters​

offset int

length int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

Remarks​

Paragraph ranges must be contiguous: each call must start exactly where the previous paragraph ended. Gaps are rejected because they would leave rope content unowned by any node, producing a document whose Avalonia.Controls.Documents.TextModel.TextDocument.Length exceeds the sum of its blocks. Line-break sequences are part of the paragraph that precedes them — see PlainTextSerializer.CreateSnapshotFromText for the canonical encoding.

AddRun Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddRun(ReadOnlyMemory<char> text, Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting elementFormatting, ReadOnlySpan<Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper> wrappers, object formatMetadata)

Parameters​

text ReadOnlyMemory<char>

formatting Avalonia.Controls.Documents.TextModel.Formatting.InlineFormatting

elementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

wrappers ReadOnlySpan<Avalonia.Controls.Documents.Serialization.Authoring.InlineWrapper>

formatMetadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddText overloads​

AddText Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddText(ReadOnlyMemory<char> text)
Parameters​

text ReadOnlyMemory<char>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddText Method​

Adds text to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddText(string text)
Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

AddUnderline Method​

Adds underlined text to the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder AddUnderline(string text)

Parameters​

text string

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

BeginDeferredTableCells Method​

Switches the current table to deferred finalization: its rows and cells stay editable until Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndTable, so a serializer can set each cell's span (and drop merge continuations) once the whole table and its column grid are known. Applies only to the current table; other tables keep the eager path.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder BeginDeferredTableCells()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

Build Method​

Builds the DocumentSnapshot.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot Build()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot

Create overloads​

Create Method​

Creates a new DocumentSnapshotBuilder.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder Create()
Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

Create Method​

Creates a builder whose root has rootKind, a root kind such as Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind.PageBand for band content.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder Create(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind rootKind)
Parameters​

rootKind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

DropDeferredTableCell Method​

Marks a deferred cell (a vertical-merge continuation folded into the cell above) so it is not emitted when the table finalizes.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder DropDeferredTableCell(int rowIndex, int cellIndex)

Parameters​

rowIndex int

cellIndex int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndContainer Method​

Ends the most recent Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartContainer(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind,Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting) and restores the prior container.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndContainer()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndList Method​

Ends the current list and restores the parent list if nested.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndList()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndSection Method​

Ends the current section and adds it as a block to the parent container.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndSection()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndTable Method​

Ends the current table.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndTable()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndTableCell Method​

Ends the current table cell.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndTableCell()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

EndTableRow Method​

Ends the current table row.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder EndTableRow()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

GetDeferredTableRowCellCount Method​

Number of cells emitted so far in a deferred row, or -1 if that row does not exist. A serializer compares this against its own cell count to confirm it can address the cells before applying spans.

public int GetDeferredTableRowCellCount(int rowIndex)

Parameters​

rowIndex int

Returns​

int

SetBulkText Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetBulkText(ReadOnlyMemory<char> text)

Parameters​

text ReadOnlyMemory<char>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetContainerCustomData Method​

Sets Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData on the active block container. Works with sections, generic containers, list items, and table cells.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetContainerCustomData(object data)

Parameters​

data object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetDeferredTableCellSpan Method​

Sets a deferred cell's column and row span by its row index and its cell index within that row (both in emit order). No-op unless deferral is active.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetDeferredTableCellSpan(int rowIndex, int cellIndex, int columnSpan, int rowSpan)

Parameters​

rowIndex int

cellIndex int

columnSpan int

rowSpan int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetDocumentFormatMetadata Method​

Sets format-specific metadata for the document root node. Serializers use this to attach round-trip metadata (e.g., DOCX header/footer margins).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetDocumentFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetDocumentFormatting Method​

Sets document-level formatting (page margins, etc.). Call before or after adding any content; takes effect at Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.Build time.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetDocumentFormatting(Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.DocumentFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetDocumentTextElementFormatting Method​

Sets the document's default text formatting - the font, size, foreground and background every block and inline inherits unless it declares its own. It travels as the root node's Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.TextElementFormatting.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetDocumentTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetFootnoteNumberFormat Method​

Sets the footnote numbering format alone, keeping the other document-level formatting; a reader learns the numbering and the page geometry from different places. The anchors added with Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddFootnoteReference(int) render their numbers in that format.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetFootnoteNumberFormat(Avalonia.Controls.Documents.FootnoteNumberFormat format)

Parameters​

format Avalonia.Controls.Documents.FootnoteNumberFormat

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListBlockFormatting Method​

Sets block formatting (e.g. explicit Padding) for the current list container. Only explicitly set properties are stored; auto-computed values (such as the marker column ListNode sizes from the item font) are intentionally omitted and recomputed at render time.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListBlockFormatting(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListFormatMetadata Method​

Sets format-specific metadata for the current list. Serializers use this to attach round-trip metadata.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListItemFormatMetadata Method​

Sets format-specific metadata for the current list item. Serializers use this to attach round-trip metadata.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListItemFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListItemFormatting Method​

Sets formatting for the current list item.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListItemFormatting(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListItemTextElementFormatting Method​

Sets base-level element formatting for the current list item.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListItemTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListMarkerAlignment Method​

Sets how the current list's marker is aligned within its column (Word's w:lvlJc): left starts every marker at the same x, right ends them at the same x with a consistent gap to the content. Shared by every item in the list.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListMarkerAlignment(Avalonia.Media.TextAlignment markerAlignment)

Parameters​

markerAlignment Avalonia.Media.TextAlignment

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetListMarkerOffset Method​

Sets the current list's marker offset (its hanging indent — how far the marker sits back from the item content). Shared by every item in the list.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetListMarkerOffset(double markerOffset)

Parameters​

markerOffset double

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetParagraphCustomData Method​

Sets Avalonia.Controls.Documents.Serialization.Snapshot.SnapshotNode.CustomData on the current paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetParagraphCustomData(object data)

Parameters​

data object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetParagraphFormatMetadata Method​

Sets format-specific metadata for the current paragraph. Serializers use this to attach round-trip metadata (e.g., RTF twips, DOCX style IDs).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetParagraphFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetParagraphFormatting Method​

Sets formatting for the current paragraph, or queues it for the next paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetParagraphFormatting(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetParagraphTextElementFormatting Method​

Sets base-level element formatting for the current paragraph. If no paragraph is active, queues it for the next paragraph.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetParagraphTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetPendingParagraphFormatting Method​

Queues paragraph formatting for the next paragraph without affecting the current one.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetPendingParagraphFormatting(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetPendingParagraphTextElementFormatting Method​

Queues base-level element formatting for the next paragraph without affecting the current one.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetPendingParagraphTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetRootCapacity Method​

Pre-allocates capacity for the root container based on estimated paragraph count. Reduces array resizes during document construction. Call after SetBulkText when paragraph count can be estimated.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetRootCapacity(int estimatedCapacity)

Parameters​

estimatedCapacity int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetRowCustomData Method​

Sets extension-specific custom data for the current table row (e.g. the markdown header-row flag).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetRowCustomData(object data)

Parameters​

data object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetRowFormatMetadata Method​

Sets format-specific metadata for the current table row. Serializers use this to attach round-trip metadata (e.g., row borders).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetRowFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetSectionFormatMetadata Method​

Sets format-specific round-trip metadata on the section currently open via Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting,Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup). No effect when the active container is not a section.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetSectionFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetSectionPageBandReferences Method​

Sets the current section's page-band references (indices from Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.AddPageBand(Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshot,Avalonia.Controls.Documents.PageBandRole,Avalonia.Controls.Documents.PageBandRule,Guid@,string)).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetSectionPageBandReferences(Avalonia.Controls.Documents.Serialization.Snapshot.PageBandReferences references)

Parameters​

references Avalonia.Controls.Documents.Serialization.Snapshot.PageBandReferences

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetSectionPageSetup Method​

Sets the page setup of the section currently open via Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting,Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup), replacing any value passed there. For readers whose format declares the setup after the section has started (RTF section control words follow \sect; a DOCX section's sectPr sits on its LAST paragraph). No effect when the active container is not a section.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetSectionPageSetup(Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup pageSetup)

Parameters​

pageSetup Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableBlockFormatting Method​

Sets block formatting for the current table.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableBlockFormatting(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableCellBackground Method​

Sets the background color of the current table cell.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableCellBackground(uint argb)

Parameters​

argb uint

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableCellBorders Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableCellBorders(Nullable<Avalonia.Thickness> borderThickness, Nullable<uint> borderBrushArgb, Nullable<Avalonia.Thickness> padding)

Parameters​

borderThickness Nullable<Avalonia.Thickness>

borderBrushArgb Nullable<uint>

padding Nullable<Avalonia.Thickness>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableCellSpan Method​

Sets how many grid columns and rows the current table cell spans (Word's w:gridSpan and w:vMerge). Each value is clamped to at least 1; a span of 1 carries nothing, so an un-merged cell stays at the default.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableCellSpan(int columnSpan, int rowSpan)

Parameters​

columnSpan int

rowSpan int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableCellTextElementFormatting Method​

Sets base-level element formatting for the current table cell.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableCellTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableCellVerticalAlignment Method​

Sets the vertical alignment of the current table cell's content (Word's w:vAlign). Top is the default.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableCellVerticalAlignment(Avalonia.Layout.VerticalAlignment verticalAlignment)

Parameters​

verticalAlignment Avalonia.Layout.VerticalAlignment

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableColumns Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableColumns(System.Collections.Generic.IReadOnlyList<double> widths)

Parameters​

widths System.Collections.Generic.IReadOnlyList<double>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableFormatMetadata Method​

Sets format-specific metadata for the current table. Serializers use this to attach round-trip metadata (e.g., original column widths).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableFormatMetadata(object metadata)

Parameters​

metadata object

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableInteriorBorders Method​

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableInteriorBorders(double width, Nullable<uint> colorArgb)

Parameters​

width double

colorArgb Nullable<uint>

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableRowHeight Method​

Sets the current table row's minimum height in device-independent pixels (Word's w:trHeight).

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableRowHeight(double height)

Parameters​

height double

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

SetTableRowTextElementFormatting Method​

Sets base-level element formatting for the current table row.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder SetTableRowTextElementFormatting(Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting formatting)

Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartContainer Method​

Starts a generic block container with an arbitrary Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind. Containers nest: calling Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.StartContainer(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind,Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting,Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting) while another is active pushes the outer container onto a stack. Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndContainer pops it. A container opened while a list item or a table cell is open nests inside it - the blocks added to the container are the container's, and the finished container is added back to the item or cell that enclosed it.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartContainer(Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind kind, Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting textElementFormatting)

Parameters​

kind Avalonia.Controls.Documents.TextModel.TextDocumentNodeKind

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

textElementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartList Method​

Starts a new list with the specified marker style. When called inside an active list item, automatically nests the new list inside the current item instead of finalizing it.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartList(Avalonia.Controls.Documents.Primitives.DocumentNodes.TextMarkerStyle markerStyle, int startIndex)

Parameters​

markerStyle Avalonia.Controls.Documents.Primitives.DocumentNodes.TextMarkerStyle

startIndex int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartNestedList Method​

Starts a nested list inside the current list item.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartNestedList(Avalonia.Controls.Documents.Primitives.DocumentNodes.TextMarkerStyle markerStyle, int startIndex)

Parameters​

markerStyle Avalonia.Controls.Documents.Primitives.DocumentNodes.TextMarkerStyle

startIndex int

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartSection overloads​

StartSection Method​

Starts a new section container. Blocks added after this call are placed inside the section until Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndSection is called.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting textElementFormatting)
Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

textElementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartSection Method​

Starts a new section container. Blocks added after this call are placed inside the section until Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder.EndSection is called.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartSection(Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting formatting, Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting textElementFormatting, Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup pageSetup)
Parameters​

formatting Avalonia.Controls.Documents.TextModel.Formatting.BlockFormatting

textElementFormatting Avalonia.Controls.Documents.TextModel.Formatting.TextElementFormatting

pageSetup Avalonia.Controls.Documents.TextModel.Formatting.SectionPageSetup

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartTable Method​

Starts a new table.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartTable()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartTableCell Method​

Starts a new table cell.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartTableCell()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

StartTableRow Method​

Starts a new table row.

public Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder StartTableRow()

Returns​

Avalonia.Controls.Documents.Serialization.Snapshot.DocumentSnapshotBuilder

On this page