# PageBorder.TopLineWidth Property

> Gets or sets the width of the top border line. If this property's value is zero there is no top border line. Otherwise it is a value in twips.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 17.0
- **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 > PageBorder.TopLineWidth Property
- **455 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/toplinewidth-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/toplinewidth-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/toplinewidth-property/llms-full.txt

---

### Description

Gets or sets the width of the top border line. If this property's value is zero there is no top border line. Otherwise it is a value in twips.

### Syntax

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

```vbnet
Public Property TopLineWidth As Integer
```

### Examples

The following example configures the page border of the first document section by using `PageBorder.TopLineWidth`.

```csharp
PageBorder pageBorder = textControl.Sections[1].Format.PageBorder;

pageBorder.TopLineWidth = 100;
Console.WriteLine($"Top Line Width used by Page Border: {pageBorder.TopLineWidth}");
```

```vbnet
Dim pageBorder As PageBorder = textControl.Sections(1).Format.PageBorder

pageBorder.TopLineWidth = 100
Console.WriteLine($"Top Line Width used by Page Border: {pageBorder.TopLineWidth}")
```

### Remarks

The property's default value is 0.

The property returns its default value when the text selection contains multiple sections with mixed setting. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [PageBorder.TopLineColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/toplinecolor-property/llms-full.txt)
- **Next:** [PageCollection Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagecollection/llms-full.txt)
