# TableCellFormat.VerticalAlignment Property

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

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > TableCellFormat.VerticalAlignment Property
- **621 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/verticalalignment-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/verticalalignment-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/verticalalignment-property/llms-full.txt

---

### Description

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

### Syntax

```csharp
public VerticalAlignment VerticalAlignment { get; set; }
```

```vbnet
Public Property VerticalAlignment As VerticalAlignment
```

### Members

| Value | Description |
|---|---|
| Top | Text is aligned at the top of the table cell. |
| Center | Text is aligned in the center of the table cell. |
| Bottom | Text 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`.

```csharp
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}");
```

```vbnet
textControl.Tables.Add(3, 3, 10)
Dim table As Table = textControl.Tables.GetItem(10)
Dim tableCellFormat As TableCellFormat = table.Cells(1, 1).CellFormat

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

---

## Nearby

- **Previous:** [TableCellFormat.TopTextDistance Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/toptextdistance-property/llms-full.txt)
- **Next:** [TableCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecollection/llms-full.txt)
