Class TableAdv
Represents the TableAdv class.
Implements
Namespace: Syncfusion.Windows.Controls.RichTextBoxAdv
Assembly: Syncfusion.SfRichTextBoxAdv.WPF.dll
Syntax
public class TableAdv : BlockAdv, INode
Examples
The following code example demonstrates how to define a table.
<RichTextBoxAdv:TableAdv>
<RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Animal</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Type</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
</RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Lion</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Carnivores</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
</RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Deer</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>Herbivores</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
</RichTextBoxAdv:TableRowAdv>
</RichTextBoxAdv:TableAdv>
// Initialize a table.
TableAdv tableAdv = new TableAdv();
// Initialize a row.
TableRowAdv tableRowAdv = new TableRowAdv();
// Initialize a table cell.
TableCellAdv tableCellAdv = new TableCellAdv();
tableCellAdv.CellFormat.CellWidth = 200;
// Initializes a paragraph.
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "First cell in first row.";
paragraphAdv.Inlines.Add(spanAdv);
tableCellAdv.Blocks.Add(paragraphAdv);
// Add any number of blocks to the cell.
tableRowAdv.Cells.Add(tableCellAdv);
// Add any number of cells to the row.
tableAdv.Rows.Add(tableRowAdv);
// Add any number of rows to the table.
' Initialize a table.
Dim tableAdv As New TableAdv()
' Initialize a row.
Dim tableRowAdv As New TableRowAdv()
' Initialize a table cell.
Dim tableCellAdv As New TableCellAdv()
tableCellAdv.CellFormat.CellWidth = 200
' Initializes a paragraph.
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "First cell in first row."
paragraphAdv.Inlines.Add(spanAdv)
tableCellAdv.Blocks.Add(paragraphAdv)
' Add any number of blocks to the cell.
tableRowAdv.Cells.Add(tableCellAdv)
' Add any number of cells to the row.
tableAdv.Rows.Add(tableRowAdv)
' Add any number of rows to the table.
Constructors
TableAdv()
Initializes a new instance of the TableAdv class.
Declaration
public TableAdv()
Fields
DescriptionProperty
Identifies the Description dependency property.
Declaration
public static readonly DependencyProperty DescriptionProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the Description dependency property. |
TableFormatProperty
Identifies the TableFormat dependency property.
Declaration
public static readonly DependencyProperty TableFormatProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the TableFormat dependency property. |
TitleProperty
Identifies the Title dependency property.
Declaration
public static readonly DependencyProperty TitleProperty
Field Value
Type | Description |
---|---|
System.Windows.DependencyProperty | The identifier for the Title dependency property. |
Properties
Description
Gets or Sets the description of the TableAdv.
Declaration
public string Description { get; set; }
Property Value
Type |
---|
System.String |
Rows
Gets the TableRowAdvCollection of the TableAdv.
Declaration
public TableRowAdvCollection Rows { get; }
Property Value
Type | Description |
---|---|
TableRowAdvCollection | The TableRowAdvCollection of the TableAdv. |
Examples
The following code example demonstrates how to add table rows.
<RichTextBoxAdv:TableAdv>
<RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>First cell in first row.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
</RichTextBoxAdv:TableRowAdv>
<!-- Add any number of table rows. -->
</RichTextBoxAdv:TableAdv>
// Initialize a table.
TableAdv tableAdv = new TableAdv();
// Initialize a row.
TableRowAdv tableRowAdv = new TableRowAdv();
// Initialize a table cell.
TableCellAdv tableCellAdv = new TableCellAdv();
tableCellAdv.CellFormat.CellWidth = 200;
// Initializes a paragraph.
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "First cell in first row.";
paragraphAdv.Inlines.Add(spanAdv);
tableCellAdv.Blocks.Add(paragraphAdv);
tableRowAdv.Cells.Add(tableCellAdv);
tableAdv.Rows.Add(tableRowAdv);
// Add any number of rows to the table.
' Initialize a table.
Dim tableAdv As New TableAdv()
' Initialize a row.
Dim tableRowAdv As New TableRowAdv()
' Initialize a table cell.
Dim tableCellAdv As New TableCellAdv()
tableCellAdv.CellFormat.CellWidth = 200
' Initializes a paragraph.
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "First cell in first row."
paragraphAdv.Inlines.Add(spanAdv)
tableCellAdv.Blocks.Add(paragraphAdv)
tableRowAdv.Cells.Add(tableCellAdv)
tableAdv.Rows.Add(tableRowAdv)
' Add any number of rows to the table.
TableFormat
Gets or sets the TableFormat of the TableAdv.
Declaration
public TableFormat TableFormat { get; set; }
Property Value
Type | Description |
---|---|
TableFormat | The TableFormat of the TableAdv. |
Examples
The following code example demonstrates how to define the table format.
<RichTextBoxAdv:TableAdv>
<!-- Define the table format. -->
<RichTextBoxAdv:TableAdv.TableFormat>
<RichTextBoxAdv:TableFormat Background="#FFFF0000" LeftIndent="24"/>
</RichTextBoxAdv:TableAdv.TableFormat>
<RichTextBoxAdv:TableRowAdv>
<RichTextBoxAdv:TableCellAdv>
<RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:CellFormat CellWidth="200"/>
</RichTextBoxAdv:TableCellAdv.CellFormat>
<RichTextBoxAdv:ParagraphAdv>
<RichTextBoxAdv:SpanAdv>First cell in first row.</RichTextBoxAdv:SpanAdv>
</RichTextBoxAdv:ParagraphAdv>
</RichTextBoxAdv:TableCellAdv>
</RichTextBoxAdv:TableRowAdv>
</RichTextBoxAdv:TableAdv>
// Initialize a table.
TableAdv tableAdv = new TableAdv();
// Define the table format.
TableFormat tableFormat = new TableFormat();
tableFormat.Background = Color.FromArgb(0xFF, 0xFF, 0x00, 0x00);
tableFormat.LeftIndent = 24;
tableAdv.TableFormat = tableFormat;
// Initialize a row.
TableRowAdv tableRowAdv = new TableRowAdv();
// Initialize a table cell.
TableCellAdv tableCellAdv = new TableCellAdv();
tableCellAdv.CellFormat.CellWidth = 200;
// Initializes a paragraph.
ParagraphAdv paragraphAdv = new ParagraphAdv();
SpanAdv spanAdv = new SpanAdv();
spanAdv.Text = "First cell in first row.";
paragraphAdv.Inlines.Add(spanAdv);
tableCellAdv.Blocks.Add(paragraphAdv);
tableRowAdv.Cells.Add(tableCellAdv);
tableAdv.Rows.Add(tableRowAdv);
' Initialize a table.
Dim tableAdv As New TableAdv()
' Define the table format.
Dim tableFormat As New TableFormat()
tableFormat.Background = Color.FromArgb(&HFF, &HFF, &H0, &H0)
tableFormat.LeftIndent = 24
tableAdv.TableFormat = tableFormat
' Initialize a row.
Dim tableRowAdv As New TableRowAdv()
' Initialize a table cell.
Dim tableCellAdv As New TableCellAdv()
tableCellAdv.CellFormat.CellWidth = 200
' Initializes a paragraph.
Dim paragraphAdv As New ParagraphAdv()
Dim spanAdv As New SpanAdv()
spanAdv.Text = "First cell in first row."
paragraphAdv.Inlines.Add(spanAdv)
tableCellAdv.Blocks.Add(paragraphAdv)
tableRowAdv.Cells.Add(tableCellAdv)
tableAdv.Rows.Add(tableRowAdv)
Title
Gets or Sets the title of the TableAdv.
Declaration
public string Title { get; set; }
Property Value
Type |
---|
System.String |