# SectionFormat.PageSize Property

> Gets or sets the section's page size. The width and height are always the values in portrait orientation.

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

---

### Description

Gets or sets the section's page size. The width and height are always the values in portrait orientation.

### Syntax

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

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

### Examples

The following example configures the layout of the first document section by using `SectionFormat.PageSize`.

```csharp
SectionFormat sectionFormat = textControl.Sections[1].Format;

sectionFormat.PageSize = new PageSize();
if (sectionFormat.PageSize != null)
{
    Console.WriteLine("Section Format: Page Size is available.");
}
```

```vbnet
Dim sectionFormat As SectionFormat = textControl.Sections(1).Format

sectionFormat.PageSize = New PageSize()
If sectionFormat.PageSize IsNot Nothing Then
    Console.WriteLine("Section Format: Page Size is available.")
End If
```

### Remarks

The property returns a width and a height of zero when the text selection contains multiple sections with mixed sizes. 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:** [SectionFormat.PageMargins Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectionformat/pagemargins-property/llms-full.txt)
- **Next:** [SectionFormat.RestartPageNumbering Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/sectionformat/restartpagenumbering-property/llms-full.txt)
