# PageMargins.Right Property

> Specifies the right margin of a TX Text Control document or document section. The measure depends on the TextControl.PageUnit, WPF.TextControl.PageUnit or ServerTextControl.PageUnit property.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.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 Server > Reference > TXTextControl > PageMargins.Right Property
- **583 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/right-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/right-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/right-property/llms-full.txt

---

### Description

Specifies the right margin of a TX Text Control document or document section. The measure depends on the [TextControl.PageUnit](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/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-server/reference/txtextcontrol/servertextcontrol/pageunit-property/llms-full.txt) property.

### Syntax

```csharp
public double Right { get; set; }
```

```vbnet
Public Property Right As Double
```

### Examples

The following example configures page margins for the current document by using `PageMargins.Right`.

```csharp
PageMargins pageMargins = textControl.PageMargins;

pageMargins.Right = 1.0;
Console.WriteLine($"Right used by Page Margins: {pageMargins.Right}");

pageMargins.Left = 1440;
pageMargins.Right = 1440;
```

```vbnet
Dim pageMargins As PageMargins = textControl.PageMargins

pageMargins.Right = 1.0
Console.WriteLine($"Right used by Page Margins: {pageMargins.Right}")

pageMargins.Left = 1440
pageMargins.Right = 1440
```

### Remarks

The margin's default value is 1 inch.

The property returns its default value when the text selection contains multiple sections with mixed margins. The [Selection.IsCommonValueSelected](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/selection/iscommonvalueselected-method/llms-full.txt) method can be used to check for mixed attributes.

---

## Nearby

- **Previous:** [PageMargins.Left Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/left-property/llms-full.txt)
- **Next:** [PageMargins.Top Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/pagemargins/top-property/llms-full.txt)
