# LoadSettings.PageMargins Property

> Gets the margins of the loaded document's pages. If the document does not contain margins the values are set to -1.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > LoadSettings.PageMargins Property
- **356 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/pagemargins-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/pagemargins-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/pagemargins-property/llms-full.txt

---

### Description

Gets the margins of the loaded document's pages. If the document does not contain margins the values are set to -1.

### Syntax

```csharp
public PageMargins PageMargins { get; }
```

```vbnet
Public ReadOnly Property PageMargins As PageMargins
```

### Examples

The following example reads `LoadSettings.PageMargins` after the template has been loaded.

```csharp
LoadSettings loadSettings = new();
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings);
Console.WriteLine($"Page Margins: {loadSettings.PageMargins}");
```

```vbnet
Dim loadSettings As New LoadSettings()
textControl.Load("template.docx", StreamType.WordprocessingML, loadSettings)
Console.WriteLine($"Page Margins: {loadSettings.PageMargins}")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [LoadSettings.LoadSubTextParts Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/loadsubtextparts-property/llms-full.txt)
- **Next:** [LoadSettings.PageSize Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/loadsettings/pagesize-property/llms-full.txt)
