TX Text Control .NET for WPF

VerticalAlignment Property

Property
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the vertical alignment of the text in the table cell.

Syntax

public VerticalAlignment VerticalAlignment { get; set; }

Members

ValueDescription
TopText is aligned at the top of the table cell.
CenterText is aligned in the center of the table cell.
BottomText is aligned at the bottom of the table cell.

Examples

The following example creates a small report table and works with its structure by using TableCellFormat.VerticalAlignment.

textControl.Tables.Add(3, 3, 10);
Table table = textControl.Tables.GetItem(10);
TableCellFormat tableCellFormat = table.Cells[1, 1].CellFormat;

tableCellFormat.VerticalAlignment = VerticalAlignment.Top;
Console.WriteLine($"Vertical Alignment used by Table Cell Format: {tableCellFormat.VerticalAlignment}");