Back to Devexpress

Table Properties Dialog

wpf-10406-controls-and-libraries-rich-text-editor-visual-elements-dialogs-table-properties-dialogs.md

latest7.0 KB
Original Source

Table Properties Dialog

  • Nov 26, 2021
  • 3 minutes to read

Overview

The Table Properties dialog allows users to change settings of an entire table and its elements: rows, columns, and cells.

Click Properties or Cell Size dialog box launcher on the Table Tools | Layout ribbon tab to invoke this dialog. Refer to the Create a Simple Rich Text Editor topic for information on how to add the ribbon UI to the RichEditControl.

The Table Properties dialog is also available from the context menu.

The dialog consists of the following tabs:

Table

Table tab options allow users to set preferred table width, alignment (table position relative to page margins), text wrapping and direction.

The following API allows you to specify Table options in code:

MemberDescription
Table.SetPreferredWidthSpecifies the table width.
Table.TableAlignmentSpecifies the table alignment. This property is ignored if the TextWrappingType is set to Around.
Table.TextWrappingTypeSpecifies the text wrapping around the table.

The Options… button invokes the Table Options dialog used to specify cell margins, spacing and whether to resize cells to fit content.

MemberDescription
TableCell.TopPaddingSpecifies the cell’s top margin.
TableCell.RightPaddingSpecifies the cell’s right margin.
TableCell.BottomPaddingSpecifies the cell’s bottom margin.
TableCell.LeftPaddingSpecifies the cell’s left margin.
Table.TableCellSpacingSpecifies the spacing between cells.

The Borders and Shading… button invokes the Borders and Shading dialog. Set the Text Wrapping option to Around to enable the Positioning button (used to invoke the Table Positioning dialog).

Row

The Row tab allows users to set the row height.

Use the following API to set row options in code:

APIDescription
Table.ForEachCell()Allows you to specify width for each table cell.
TableRow.HeightTypeGets or sets the height type.
TableRow.HeightDefines row height.
TableRow.RepeatAsHeaderRowSpecifies whether to repeat a header row at the top of each page.
TableRow.BreakAcrossPagesSpecifies whether the row can be split when the table expands to another page.

Column

On the Column tab, users can set tick the Preferred width box to specify column width.

Use the following API to set column width in code:

APIDescription
Table.ForEachCell()Allows you to specify width for each table cell.
TableCell.PreferredWidthTypeGets or sets the width type.
TableCell.PreferredWidthDefines cell width.

Cell

Cell tab options allow users to set the preferred table cell width and select the vertical alignment of cell content

The API from the table below allows you to specify the Cell options in code:

MemberDescription
TableCell.PreferredWidthTypeGets or sets the width type.
TableCell.PreferredWidthDefines the cell width.
TableCell.VerticalAlignmentSpecifies cell content’s alignment.

The Options… button invokes the Cell Options dialog. Use this dialog to to change cell margins (the space between cell borders and cell content) and specify whether to wrap the cell content.

MemberDescription
TableCell.TopPaddingSpecifies the cell’s top margin.
TableCell.RightPaddingSpecifies the cell’s right margin.
TableCell.BottomPaddingSpecifies the cell’s bottom margin.
TableCell.LeftPaddingSpecifies the cell’s left margin.
Table.TableCellSpacingSpecifies the spacing between cells.
TableCell.WordWrapgets os sets whether to wrap cell content.