# TextControl.Pages Property

> Gets the number of pages contained in the current document.

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

---

### Description

Gets the number of pages contained in the current document.

### Syntax

```csharp
public int Pages { get; }
```

```vbnet
Public ReadOnly Property Pages As Integer
```

### Examples

The following example includes the pages value in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Pages: {textControl.Pages}");
Console.WriteLine("Text Control is ready for use.");
```

```vbnet
Console.WriteLine($"Pages: {textControl.Pages}")
Console.WriteLine("Text Control is ready for use.")
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [TextControl.PageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pagemargins-property/llms-full.txt)
- **Next:** [TextControl.PageSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pagesize-property/llms-full.txt)
