# TableCellFormat.TopBorderWidth Property

> Gets or sets, in twips, the width of the table cell's top border.

- **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.TopBorderWidth Property
- **537 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/topborderwidth-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/topborderwidth-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tablecellformat/topborderwidth-property/llms-full.txt

---

### Description

Gets or sets, in twips, the width of the table cell's top border.

### Syntax

```csharp
public int TopBorderWidth { get; set; }
```

```vbnet
Public Property TopBorderWidth As Integer
```

### Examples

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

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

tableCellFormat.TopBorderWidth = 100;
Console.WriteLine($"Top Border Width used by Table Cell Format: {tableCellFormat.TopBorderWidth}");
```

```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.TopBorderWidth = 100
Console.WriteLine($"Top Border Width used by Table Cell Format: {tableCellFormat.TopBorderWidth}")
```

---

## Nearby

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