VegaRise.NET
Back to DOM

TableStyleClass

Definition

Namespace
DOM.Styles
Assembly
DOM.dll

Represents high-level styling and layout characteristics for a table.

Remarks

extends with properties that control table layout, presentation look-up flags, sizing, placement and per-column grid width hints. Most properties are nullable so consumers can distinguish between "unspecified" (allowing inheritance or document defaults) and an explicit value. TableStyle TableBaseStyle Rendering and layout engines should consult both this style and the inherited values to determine the final appearance and behavior of a table. TableBaseStyle

Examples

csharp
1// 1. Auto-fit table with header and banding
2var style = new TableStyle
3{
4 Layout = TableLayoutValues.Autofit,
5 TableLook = new TableLook { FirstRow = true, NoHorizontalBand = false }
6};
7
csharp
1// 2. Fixed layout with explicit column widths
2var style = new TableStyle
3{
4 Layout = TableLayoutValues.Fixed,
5 TableGridColsWidth = new List<DocumentUnit>
6 {
7 new DocumentUnit(2.0, Units.inch),
8 new DocumentUnit(2.0, Units.inch),
9 new DocumentUnit(2.0, Units.inch)
10 }
11};
12
csharp
1// 3. Center-aligned table with an explicit width
2var style = new TableStyle
3{
4 Justification = TableJustificationValues.center,
5 Width = new DocumentUnit(6.0, Units.inch)
6};
7
csharp
1// 4. Floating table positioned relative to margins
2var style = new TableStyle
3{
4 PlacementPosition = new PlacementPosition
5 {
6 HorizantalAnchor = AnchorValues.Margin,
7 VerticalAnchor = AnchorValues.Page,
8 HorizantalAlignment = HorizontalAlignmentValues.Center
9 },
10 TableOverlap = true
11};
12
csharp
1// 5. Indented table
2var style = new TableStyle { Indent = new DocumentUnit(0.5, Units.inch) };
3
csharp
1// 6. Apply to a table
2var table = new Table(2, 2)
3{
4 Style = new TableStyle { Layout = TableLayoutValues.Autofit }
5};
6

Properties

AllowAutoFit

Gets or sets whether the table should automatically adjust column widths to fit content.

Gets or sets the indentation (leading inset) applied to the table relative to its containing area.

Gets or sets the preferred table layout algorithm.

PlacementPosition

Gets or sets the placement position hint for the table (for example inline, absolute/floating).

TableGridColsWidthDocumentUnit

Gets or sets optional per-column width hints for the table grid.

TableLook

Gets or sets visual presentation flags that control header/footer and banding behaviour.

TableOverlap

Gets or sets whether the table is allowed to overlap adjacent objects (floating behaviour).

Gets or sets the desired width of the table.

VegaRise.NET

Sign In

Welcome back. Please sign in to your account.

Forgot password?
or

Don't have an account? Create an account

By signing in, you agree to our Terms of Service and Privacy Policy.