# TableOfContents.HasRightAlignedPageNumbers Property

> Gets or sets a value specifying whether the page numbers in the table of contents are right-aligned. To realize right-aligned page numbers a tab is inserted and its TabType is set to RightBorderTab.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **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 > TableOfContents.HasRightAlignedPageNumbers Property
- **582 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/hasrightalignedpagenumbers-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/hasrightalignedpagenumbers-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/hasrightalignedpagenumbers-property/llms-full.txt

---

### Description

Gets or sets a value specifying whether the page numbers in the table of contents are right-aligned. To realize right-aligned page numbers a tab is inserted and its [TabType](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tabtype/enumeration/llms-full.txt) is set to `RightBorderTab`.

### Syntax

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

```vbnet
Public Property HasRightAlignedPageNumbers As Boolean
```

### Examples

The following example creates a table of contents for the document's heading styles by using `TableOfContents.HasRightAlignedPageNumbers`.

```csharp
TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);

tableOfContents.HasRightAlignedPageNumbers = true;
if (tableOfContents.HasRightAlignedPageNumbers)
{
    Console.WriteLine("Table Of Contents: Has Right Aligned Page Numbers is enabled.");
}
```

```vbnet
Dim tableOfContents As New TableOfContents(1, 3) With { .Name = "Contents", .ID = 10 }
textControl.TablesOfContents.Add(tableOfContents)

tableOfContents.HasRightAlignedPageNumbers = True
If tableOfContents.HasRightAlignedPageNumbers Then
    Console.WriteLine("Table Of Contents: Has Right Aligned Page Numbers is enabled.")
End If
```

---

## Nearby

- **Previous:** [TableOfContents.HasPageNumbers Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/haspagenumbers-property/llms-full.txt)
- **Next:** [TableOfContents.HighlightColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/tableofcontents/highlightcolor-property/llms-full.txt)
