# DocumentTarget.AutoGenerationType Property

> Gets the type of auto-generation. A document target which is the target of an entry in a table of contents is automatically generated when the table of contents is inserted into the document.

- **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 > DocumentTarget.AutoGenerationType Property
- **533 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/autogenerationtype-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/autogenerationtype-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/autogenerationtype-property/llms-full.txt

---

### Description

Gets the type of auto-generation. A document target which is the target of an entry in a table of contents is automatically generated when the table of contents is inserted into the document.

### Syntax

```csharp
public AutoGenerationType AutoGenerationType { get; }
```

```vbnet
Public ReadOnly Property AutoGenerationType As AutoGenerationType
```

### Members

| Value | Description |
|---|---|
| None | The document target is not automatically generated. |
| TableOfContents | The document target has automatically been generated as target of an entry in a table of contents. The [TargetName](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/targetname-property/llms-full.txt) begins with "TOC\_" followed by an auto-generated number. |

### Examples

The following example creates a named destination for an internal document link by using `DocumentTarget.AutoGenerationType`.

```csharp
DocumentTarget documentTarget = new("CustomerDetails");
textControl.DocumentTargets.Add(documentTarget);

Console.WriteLine($"Auto Generation Type: {documentTarget.AutoGenerationType}");
Console.WriteLine("Document Target is ready for use.");
```

```vbnet
Dim documentTarget As New DocumentTarget("CustomerDetails")
textControl.DocumentTargets.Add(documentTarget)

Console.WriteLine($"Auto Generation Type: {documentTarget.AutoGenerationType}")
Console.WriteLine("Document Target is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [DocumentTarget Class](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/llms-full.txt)
- **Next:** [DocumentTarget.Bounds Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttarget/bounds-property/llms-full.txt)
