# RulerBarViewGenerator.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 Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 21.0
- **Namespace:** `TXTextControl.ServerVisualisation`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Server.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.ServerVisualization > RulerBarViewGenerator.EnablePageMargins Property
- **393 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/enablepagemargins-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/enablepagemargins-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-servervisualization/rulerbarviewgenerator/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 `RulerBarViewGenerator.EnablePageMargins` to configure enable page margins as part of the ruler bar view generator workflow. The configured value is checked before the workflow continues.

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

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

---

## Nearby

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