Skip to main content

ListFormatting Struct

Definition​

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

List formatting snapshot. Value type for zero-reference safety. All data is stored as primitive types to ensure thread-safety.

public struct ListFormatting

Inheritance: ValueType -> ListFormatting

Implements: IEquatable<ListFormatting>

Remarks​

Memory footprint: ~8 bytes per instance (struct, inline in SnapshotNode).

Only relevant for list nodes. Null properties mean "not explicitly set, inherit from parent or use default".

This struct contains only format-independent properties that map directly to UI counterparts. RTF-specific measurements (marker indent, text indent, etc.) are stored in BlockRtfMetadata.

Methods​

NameDescription
Equals (2 overloads)No summary available.
GetHashCodeNo summary available.
ToStringNo summary available.

Equals overloads​

Equals Method​

public bool Equals(Avalonia.Controls.Documents.TextModel.Formatting.ListFormatting other)
Parameters​

other Avalonia.Controls.Documents.TextModel.Formatting.ListFormatting

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​

NameDescription
DefaultDefault formatting with no explicit values set.
MarkerAlignmentHow the marker aligns within its column (Word's w:lvlJc), mapping to Avalonia.Controls.Documents.List.MarkerAlignment. Null means not explicitly set (left).
MarkerOffsetThe horizontal distance the marker hangs back from the item content (the list's hanging indent), in device-independent pixels. Maps to Avalonia.Controls.Documents.List.MarkerOffset. Null means not explicitly set, so the marker sits at the list's left edge.
MarkerStyleThe style of the list marker (e.g., Disc, Decimal, LowerAlpha). Null means not explicitly set.
StartIndexThe starting index for numbered lists (typically 1). Null means not explicitly set (use default of 1).

Default Property​

Default formatting with no explicit values set.

public Avalonia.Controls.Documents.TextModel.Formatting.ListFormatting Default { get; set; }

MarkerAlignment Property​

How the marker aligns within its column (Word's w:lvlJc), mapping to Avalonia.Controls.Documents.List.MarkerAlignment. Null means not explicitly set (left).

public Nullable<Avalonia.Media.TextAlignment> MarkerAlignment { get; set; }

MarkerOffset Property​

The horizontal distance the marker hangs back from the item content (the list's hanging indent), in device-independent pixels. Maps to Avalonia.Controls.Documents.List.MarkerOffset. Null means not explicitly set, so the marker sits at the list's left edge.

public Nullable<double> MarkerOffset { get; set; }

MarkerStyle Property​

The style of the list marker (e.g., Disc, Decimal, LowerAlpha). Null means not explicitly set.

public Nullable<Avalonia.Controls.Documents.Primitives.DocumentNodes.TextMarkerStyle> MarkerStyle { get; set; }

StartIndex Property​

The starting index for numbered lists (typically 1). Null means not explicitly set (use default of 1).

public Nullable<int> StartIndex { get; set; }