# DocumentController.Pages Property

> Gets a collection of all pages contained in the currently loaded document.

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

---

### Description

Gets a collection of all pages contained in the currently loaded document.

### Syntax

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

```vbnet
Public ReadOnly Property Pages As PageCollection
```

### Examples

The following example iterates through the pages collection and processes each page.

```csharp
foreach (Page page in documentController.Pages)
{
    Console.WriteLine(page.Length);
}
```

```vbnet
For Each page As Page In documentController.Pages
    Console.WriteLine(page.Length)
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [DocumentController.MergeField Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver/documentcontroller/mergefield-method/llms-full.txt)
- **Next:** [DocumentController.Save Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver/documentcontroller/save-method/llms-full.txt)
