# PageSize Constructor

> Creates a new instance of the PageSize class. The measure for the width and height parameters depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Constructor
- **Introduced:** 16.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 > PageSize Constructor
- **814 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/constructor/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/constructor/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/constructor/llms-full.txt

---

### Description

Creates a new instance of the [PageSize](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/llms-full.txt) class. The measure for the width and height parameters depends on the [TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt), [WPF.TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt) or [ServerTextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pageunit-property/llms-full.txt) property.

### Syntax

#### PageSize()

Creates a new [PageSize](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/llms-full.txt) object representing an US Letter page size (8.5 x 11 inch).

```csharp
public PageSize();
```

```vbnet
Public Sub New()
```

#### PageSize(double, double)

Creates a new [PageSize](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/llms-full.txt) object representing a page size with the specified width and height. The measure for the width and height parameters depends on the [TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt), [WPF.TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/textcontrol/pageunit-property/llms-full.txt) or [ServerTextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/pageunit-property/llms-full.txt) property.

```csharp
public PageSize(double width, double height);
```

```vbnet
Public Sub New(width As Double, height As Double)
```

| Parameter | Description |
|---|---|
| width | Specifies the width of the page. |
| height | Specifies the height of the page. |

#### PageSize(SerializationInfo, StreamingContext)

```csharp
protected PageSize(SerializationInfo info, StreamingContext context);
```

```vbnet
Protected Sub New(info As SerializationInfo, context As StreamingContext)
```

### Examples

The following example creates a Page Size instance and configures its width setting for a document workflow.

```csharp
PageSize pageSize = new();
pageSize.Width = 1.0;
```

```vbnet
Dim pageSize As New PageSize()
pageSize.Width = 1.0
```

---

## Nearby

- **Previous:** [PageSize.Attribute Enumeration](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/attribute-enumeration/llms-full.txt)
- **Next:** [PageSize.Height Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/pagesize/height-property/llms-full.txt)
