# TextFrame.BorderWidth Property

> Gets or sets the width, in twips, of a text frame's border line. To alter the distance between the border line and the text, use the InternalMargins property. If this property is set to zero, the text frame has no border line.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > TextFrame.BorderWidth Property
- **459 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/borderwidth-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/borderwidth-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/borderwidth-property/llms-full.txt

---

### Description

Gets or sets the width, in twips, of a text frame's border line. To alter the distance between the border line and the text, use the [InternalMargins](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/internalmargins-property/llms-full.txt) property. If this property is set to zero, the text frame has no border line.

### Syntax

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

```vbnet
Public Property BorderWidth As Integer
```

### Examples

The following example applies bold formatting through the text frame's selection by using `TextFrame.BorderWidth`.

```csharp
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

textFrame.BorderWidth = 100;
Console.WriteLine($"Border Width used by Text Frame: {textFrame.BorderWidth}");
```

```vbnet
Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection

textFrame.BorderWidth = 100
Console.WriteLine($"Border Width used by Text Frame: {textFrame.BorderWidth}")
```

---

## Nearby

- **Previous:** [TextFrame.BorderStyle Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/borderstyle-property/llms-full.txt)
- **Next:** [TextFrame.Charts Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframe/charts-property/llms-full.txt)
