# TableOfContents.Name Property

> Gets or sets a name for the table of contents. An empty string indicates that the table of contents has no name.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.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 WPF > Reference > TXTextControl > TableOfContents.Name Property
- **559 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontents/name-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontents/name-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontents/name-property/llms-full.txt

---

### Description

Gets or sets a name for the table of contents. An empty string indicates that the table of contents has no name.

### Syntax

```csharp
public string Name { get; set; }
```

```vbnet
Public Property Name As String
```

### Examples

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

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

tableOfContents.Name = "TableOfContents1";
if (!string.IsNullOrWhiteSpace(tableOfContents.Name))
{
    Console.WriteLine($"Name: {tableOfContents.Name}");
}
```

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

tableOfContents.Name = "TableOfContents1"
If Not String.IsNullOrWhiteSpace(tableOfContents.Name) Then
    Console.WriteLine($"Name: {tableOfContents.Name}")
End If
```

---

## Nearby

- **Previous:** [TableOfContents.MinimumStructureLevel Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontents/minimumstructurelevel-property/llms-full.txt)
- **Next:** [TableOfContents.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/tableofcontents/number-property/llms-full.txt)
