TableFormatting Struct
Definition
Table formatting snapshot. Value type for zero-reference safety. All data is stored as primitive types to ensure thread-safety.
public struct TableFormatting
Remarks
Memory footprint: ~8 bytes + array overhead (struct, inline in SnapshotNode).
Only relevant for table nodes. Null properties mean "not explicitly set, inherit from parent or use default".
Format-agnostic: Contains only primitive values in device-independent pixels (DIPs). Format-specific details (RTF cell spacing/padding, border styles, cell merge flags, etc.) are stored in format-specific metadata (e.g., TableRtfMetadata).
Properties are optimized for extraction from RichTextElement during snapshot creation and reconstruction to RichTextElement from snapshot. Values use device-independent pixels to match Avalonia property system conventions.
Cell padding maps to TableCell.Padding, with the original RTF values (\trgaph) preserved in TableRtfMetadata for round-trip.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | No summary available. |
| GetHashCode | No summary available. |
| ToString | No summary available. |
Equals overloads
Equals Method
public bool Equals(Avalonia.Controls.Documents.TextModel.Formatting.TableFormatting other)
Parameters
other Avalonia.Controls.Documents.TextModel.Formatting.TableFormatting
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
| Name | Description |
|---|---|
| Columns | Column definitions with width value and unit type. Default means not explicitly set (use auto-layout or equal distribution). |
| Default | Default formatting with no explicit values set. |
| InsideBorderArgb | Packed ARGB colour of the interior gridlines. Null means no interior grid. |
| InsideBorderWidth | Width, in device-independent pixels, of the interior gridlines drawn between cells (Word's w:insideH / w:insideV). Zero means no interior grid. |
Columns Property
Column definitions with width value and unit type. Default means not explicitly set (use auto-layout or equal distribution).
public Avalonia.Controls.Documents.TextModel.Formatting.TableColumnWidth[] Columns { get; set; }
Remarks
The widths carry their Avalonia.Controls.GridUnitType, so a Star column stays a
Star column across snapshot capture, undo and a serializer round trip. The
array is immutable: these widths reach undo and redo through
TableSnapshotNode, where a write through an alias would rewrite a
recorded state.
Default Property
Default formatting with no explicit values set.
public Avalonia.Controls.Documents.TextModel.Formatting.TableFormatting Default { get; set; }
InsideBorderArgb Property
Packed ARGB colour of the interior gridlines. Null means no interior grid.
public Nullable<uint> InsideBorderArgb { get; set; }
InsideBorderWidth Property
Width, in device-independent pixels, of the interior gridlines drawn between cells
(Word's w:insideH / w:insideV). Zero means no interior grid.
public double InsideBorderWidth { get; set; }