# PageBorder.FirstPageOnly Property

> Gets or sets a value indicating whether the page border is drawn only on the first page of the section. If this property is set to true, the page border is drawn only on the first page, otherwise it is drawn on all pages of the section.

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

---

### Description

Gets or sets a value indicating whether the page border is drawn only on the first page of the section. If this property is set to true, the page border is drawn only on the first page, otherwise it is drawn on all pages of the section.

### Syntax

```csharp
public bool FirstPageOnly { get; set; }
```

```vbnet
Public Property FirstPageOnly As Boolean
```

### Examples

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

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

pageBorder.FirstPageOnly = true;
if (pageBorder.FirstPageOnly)
{
    Console.WriteLine("Page Border: First Page Only is enabled.");
}
```

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

pageBorder.FirstPageOnly = True
If pageBorder.FirstPageOnly Then
    Console.WriteLine("Page Border: First Page Only is enabled.")
End If
```

### Remarks

The property's default value is false.

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.DefaultDistance Field](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/defaultdistance-field/llms-full.txt)
- **Next:** [PageBorder.LeftDistance Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pageborder/leftdistance-property/llms-full.txt)
