Class Table
Inherited Members
Namespace: Telerik.Windows.Documents.Model
Assembly: Telerik.Windows.Documents.dll
Syntax
public class Table : Block
Constructors
Table()
Table(Int32, Int32)
Initializes a new instance of the Table class.
Declaration
public Table(int rowsCount, int columnsCount)
Parameters
System.Int32
rowsCount
The number of rows of the table. |
System.Int32
columnsCount
The number of columns of the table. |
Fields
BackgroundProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<Color>, TableProperties> BackgroundProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.Media.Color>, TableProperties>
|
BordersProperty
Declaration
public static readonly StylePropertyDefinition<TableBorders, TableProperties> BordersProperty
Field Value
StylePropertyDefinition<TableBorders, TableProperties>
|
CellPaddingProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<Padding>, TableProperties> CellPaddingProperty
Field Value
StylePropertyDefinition<System.Nullable<Padding>, TableProperties>
|
CellSpacingProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<double>, TableProperties> CellSpacingProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Double>, TableProperties>
|
ColumnBandSizeProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<int>, TableProperties> ColumnBandSizeProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Int32>, TableProperties>
|
FlowDirectionProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<FlowDirection>, TableProperties> FlowDirectionProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Windows.FlowDirection>, TableProperties>
|
HorizontalAlignmentProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<RadHorizontalAlignment>, TableProperties> HorizontalAlignmentProperty
Field Value
StylePropertyDefinition<System.Nullable<RadHorizontalAlignment>, TableProperties>
|
LayoutModeProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<TableLayoutMode>, TableProperties> LayoutModeProperty
Field Value
StylePropertyDefinition<System.Nullable<TableLayoutMode>, TableProperties>
|
PreferredWidthProperty
Declaration
public static readonly StylePropertyDefinition<TableWidthUnit, TableProperties> PreferredWidthProperty
Field Value
StylePropertyDefinition<TableWidthUnit, TableProperties>
|
RowBandSizeProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<int>, TableProperties> RowBandSizeProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Int32>, TableProperties>
|
TableIndentProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<double>, TableProperties> TableIndentProperty
Field Value
StylePropertyDefinition<System.Nullable<System.Double>, TableProperties>
|
TableLookProperty
Declaration
public static readonly StylePropertyDefinition<TableLook, TableProperties> TableLookProperty
Field Value
StylePropertyDefinition<TableLook, TableProperties>
|
ThemeBackgroundProperty
Declaration
public static readonly StylePropertyDefinition<Nullable<ThemeColorsEnum>, TableProperties> ThemeBackgroundProperty
Field Value
StylePropertyDefinition<System.Nullable<ThemeColorsEnum>, TableProperties>
|
ThemeFillShadeProperty
Declaration
public static readonly StylePropertyDefinition<string, TableProperties> ThemeFillShadeProperty
Field Value
StylePropertyDefinition<System.String, TableProperties>
|
ThemeFillTintProperty
Declaration
public static readonly StylePropertyDefinition<string, TableProperties> ThemeFillTintProperty
Field Value
StylePropertyDefinition<System.String, TableProperties>
|
Properties
Background
Gets or sets the table background.
Declaration
[XamlSerializable]
public Color Background { get; set; }
Property Value
System.Windows.Media.Color
The background. |
Borders
Gets or sets all borders of the table.
Declaration
[XamlSerializable]
public TableBorders Borders { get; set; }
Property Value
TableBorders
The borders. |
CellPadding
Gets or sets the cell padding.
Declaration
[XamlSerializable]
public Padding CellPadding { get; set; }
Property Value
Padding
The cell padding. |
CellSpacing
Gets or sets the cell spacing.
Declaration
[XamlSerializable]
public double CellSpacing { get; set; }
Property Value
System.Double
The cell spacing. |
ColumnBandSize
Declaration
[XamlSerializable]
public int ColumnBandSize { get; set; }
Property Value
System.Int32
|
FlowDirection
Gets or sets the flow direction of the table contents.
Declaration
[XamlSerializable]
public FlowDirection FlowDirection { get; set; }
Property Value
System.Windows.FlowDirection
The flow direction. |
Grid
Gets the grid of the table which keeps information about the rows and columns.
Declaration
public TableGrid Grid { get; }
Property Value
TableGrid
The grid. |
GridColumnWidthsSerializationInfo
Declaration
[XamlSerializable]
public TableGridColumnWidthsSerializationInfo GridColumnWidthsSerializationInfo { get; set; }
Property Value
TableGridColumnWidthsSerializationInfo
|
HasFixedStructure
This property supports control infrastructure and is not intended for use directly from your code.
Declaration
[XamlSerializable]
public bool HasFixedStructure { get; set; }
Property Value
System.Boolean
|
HorizontalAlignment
Gets or sets the horizontal alignment.
Declaration
[XamlSerializable]
public RadHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
RadHorizontalAlignment
The horizontal alignment. |
LayoutMode
Gets or sets then table layout mode.
Declaration
[XamlSerializable]
public TableLayoutMode LayoutMode { get; set; }
Property Value
TableLayoutMode
The layout mode. |
PreferredWidth
Gets or sets the preferred width of the table.
Declaration
[XamlSerializable]
public TableWidthUnit PreferredWidth { get; set; }
Property Value
TableWidthUnit
The preferred width. |
RowBandSize
Declaration
[XamlSerializable]
public int RowBandSize { get; set; }
Property Value
System.Int32
|
Rows
Gets the rows.
Declaration
public TableRowCollection Rows { get; }
Property Value
TableRowCollection
The rows. |
TableIndent
Gets or sets the table indent.
Declaration
[XamlSerializable]
public double TableIndent { get; set; }
Property Value
System.Double
The table indent. |
TableLook
Gets or sets the table look.
The look of a table defines the components of the conditional formatting which will be applied to it.
Declaration
[XamlCompositePropertySerializable]
public TableLook TableLook { get; set; }
Property Value
TableLook
The table look. |
ThemeBackground
Gets or sets the theme background.
Declaration
[XamlSerializable]
public ThemeColorsEnum ThemeBackground { get; set; }
Property Value
ThemeColorsEnum
The theme background. |
ThemeFillShade
Declaration
[XamlSerializable]
public string ThemeFillShade { get; set; }
Property Value
System.String
|
ThemeFillTint
Declaration
[XamlSerializable]
public string ThemeFillTint { get; set; }
Property Value
System.String
|
Methods
AddColumn()
Adds a column after the last one in the table.
Declaration
public IEnumerable<TableCell> AddColumn()
Returns
System.Collections.Generic.IEnumerable<TableCell>
A collection of the added TableCells. |
AddColumnToTheLeft(TableCell)
Adds a column on the left side of an existing cell.
Declaration
public IEnumerable<TableCell> AddColumnToTheLeft(TableCell existingCell)
Parameters
TableCell
existingCell
The existing TableCell. |
Returns
System.Collections.Generic.IEnumerable<TableCell>
A collection of the added TableCells. |
Exceptions
System.InvalidOperationException
Cell must be from the same table. |
AddColumnToTheRight(TableCell)
Adds a column on the right side of an existing cell.
Declaration
public IEnumerable<TableCell> AddColumnToTheRight(TableCell existingCell)
Parameters
TableCell
existingCell
The existing TableCell. |
Returns
System.Collections.Generic.IEnumerable<TableCell>
A collection of the added TableCells. |
Exceptions
System.InvalidOperationException
Cell must be from the same table. |
AddRow()
Adds copy of the last TableRow in the table. If the table doesn't have any rows, then a new TableRow is added.
Declaration
public TableRow AddRow()
Returns
TableRow
The newly added row. |
AddRow(TableRow)
Adds a TableRow as a last row in the table.
Declaration
public TableRow AddRow(TableRow newRow)
Parameters
TableRow
newRow
The new TableRow. |
Returns
TableRow
The added TableRow instance. |
Exceptions
System.ArgumentException
Row already added to this table. |
AddRowAbove(TableRow)
Copies a specified TableRow and adds the copy above it.
Declaration
public TableRow AddRowAbove(TableRow existingRow)
Parameters
TableRow
existingRow
The existing row. |
Returns
TableRow
The added TableRow instance. |
AddRowAbove(TableRow, TableRow)
Adds a TableRow above an existing one.
Declaration
public TableRow AddRowAbove(TableRow existingRow, TableRow newRow)
Parameters
TableRow
existingRow
The existing TableRow. |
TableRow
newRow
The new TableRow. |
Returns
TableRow
The added TableRow instance. |
Exceptions
System.InvalidOperationException
Row must be from the same table. |
System.ArgumentException
Row already added. |
AddRowAtIndex(Int32)
Adds a copy of the nearest TableRow at a specific index.
Declaration
public TableRow AddRowAtIndex(int index)
Parameters
System.Int32
index
The index. |
Returns
TableRow
The added TableRow instance. |
Exceptions
System.ArgumentException
Incorrect index value. |
AddRowAtIndex(Int32, TableRow)
Adds a TableRow at a specific index.
Declaration
public TableRow AddRowAtIndex(int index, TableRow rowToAdd)
Parameters
System.Int32
index
The index. |
TableRow
rowToAdd
The row to add. |
Returns
TableRow
The added TableRow instance. |
Exceptions
System.ArgumentException
Incorrect index value. |
AddRowBelow(TableRow)
Copies a specified TableRow and adds the copy below it.
Declaration
public TableRow AddRowBelow(TableRow existingRow)
Parameters
TableRow
existingRow
The existing TableRow. |
Returns
TableRow
The added TableRow instance. |
AddRowBelow(TableRow, TableRow)
Adds a TableRow below an existing one.
Declaration
public TableRow AddRowBelow(TableRow existingRow, TableRow newRow)
Parameters
TableRow
existingRow
The existing TableRow. |
TableRow
newRow
The new TableRow. |
Returns
TableRow
The added TableRow instance. |
Exceptions
System.InvalidOperationException
Row must be from the same table. |
System.ArgumentException
Row already added. |
CopyPropertiesFromOverride(DocumentElement)
Copies the properties of a Table instance to the current object.
Declaration
protected override void CopyPropertiesFromOverride(DocumentElement fromElement)
Parameters
DocumentElement
fromElement
The Table to copy the properties from. |
Overrides
CreateLayoutBox(DocumentStructureCollection)
Creates a new TableLayoutBox.
Declaration
public override LayoutBox CreateLayoutBox(DocumentStructureCollection documentCollection)
Parameters
DocumentStructureCollection
documentCollection
The document collection. |
Returns
LayoutBox
The new TableLayoutBox. |
Overrides
CreateNewElementInstance()
Creates a new instance of the Table class.
Declaration
protected override DocumentElement CreateNewElementInstance()
Returns
DocumentElement
The new instance. |
Overrides
DeleteRow(TableRow)
Deletes a TableRow.
Declaration
public void DeleteRow(TableRow row)
Parameters
TableRow
row
The row to delete. |
Exceptions
System.InvalidOperationException
Row must be from the same table. |
GetGridColumnWidth(Int32)
Gets the width of the grid column.
Declaration
public TableWidthUnit GetGridColumnWidth(int gridColumnIndex)
Parameters
System.Int32
gridColumnIndex
Index of the grid column. This index should not be affected of any merged cells. |
Returns
TableWidthUnit
A TableWidthUnit representing the width of the column. |
OnStyleChanged()
SetGridColumnWidth(Int32, TableWidthUnit)
Sets the width of the grid column.
Declaration
public void SetGridColumnWidth(int gridColumnIndex, TableWidthUnit width)
Parameters
System.Int32
gridColumnIndex
Index of the grid column. This index should not be affected of any merged cells. |
TableWidthUnit
width
The width. |
Exceptions
System.ArgumentOutOfRangeException
gridColumnIndex should be greater than or equal to 0. |