# TextControl.PageSize Property

> Specifies the width and height of the pages for the current document. The measure depends on the WPF.TextControl.PageUnit property. The default measure is device-independent units (1/96th inch). The property value is an object of the type PageSize. For more information see the description of the PageSize class.

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

---

### Description

Specifies the width and height of the pages for the current document. The measure depends on the [WPF.TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt) property. The default measure is device-independent units (1/96th inch). The property value is an object of the type [PageSize](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/llms-full.txt). For more information see the description of the PageSize class.

### Syntax

```csharp
public PageSize PageSize { get; set; }
```

```vbnet
Public Property PageSize As PageSize
```

### Examples

The following example uses `TextControl.PageSize` to apply the required page dimensions. The configured value is checked before the workflow continues.

```csharp
textControl.PageSize = new PageSize();
if (textControl.PageSize != null)
{
    Console.WriteLine("Text Control: Page Size is available.");
}
```

```vbnet
textControl.PageSize = New PageSize()
If textControl.PageSize IsNot Nothing Then
    Console.WriteLine("Text Control: Page Size is available.")
End If
```

---

## Nearby

- **Previous:** [TextControl.Pages Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pages-property/llms-full.txt)
- **Next:** [TextControl.PageUnit Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt)
