# RulerBar.EnablePageMargins Property

> Enables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled.

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

---

### Description

Enables or disables the setting of page margins. If the property's value is true, the setting of page margins is enabled.

### Syntax

```csharp
public bool EnablePageMargins { get; set; }
```

```vbnet
Public Property EnablePageMargins As Boolean
```

### Examples

The following example uses `RulerBar.EnablePageMargins` to configure enable page margins as part of the ruler bar workflow. The configured value is checked before the workflow continues.

```csharp
rulerBar.EnablePageMargins = true;
if (rulerBar.EnablePageMargins)
{
    Console.WriteLine("Ruler Bar: Enable Page Margins is enabled.");
}
```

```vbnet
rulerBar.EnablePageMargins = True
If rulerBar.EnablePageMargins Then
    Console.WriteLine("Ruler Bar: Enable Page Margins is enabled.")
End If
```

---

## Nearby

- **Previous:** [RulerBar.DisplayColors Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/displaycolors-property/llms-full.txt)
- **Next:** [RulerBar.FormulaMode Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf/rulerbar/formulamode-property/llms-full.txt)
