# TextFrame.DocumentTargets Property

> Gets a collection of all targets in a text frame. The property value is an object of the type DocumentTargetCollection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 23.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 > TextFrame.DocumentTargets Property
- **467 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/documenttargets-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/documenttargets-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/documenttargets-property/llms-full.txt

---

### Description

Gets a collection of all targets in a text frame. The property value is an object of the type [DocumentTargetCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documenttargetcollection/llms-full.txt).

### Syntax

```csharp
public DocumentTargetCollection DocumentTargets { get; }
```

```vbnet
Public ReadOnly Property DocumentTargets As DocumentTargetCollection
```

### Examples

The following example applies bold formatting through the text frame's selection by using `TextFrame.DocumentTargets`.

```csharp
Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

foreach (DocumentTarget documentTarget in textFrame.DocumentTargets)
{
    documentTarget.Name = "CustomerName";
}
```

```vbnet
Dim formattedSelection As Selection = textFrame.Selection
formattedSelection.Bold = True
textFrame.Selection = formattedSelection

For Each documentTarget As DocumentTarget In textFrame.DocumentTargets
    documentTarget.Name = "CustomerName"
Next
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [TextFrame.DocumentLinks Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/documentlinks-property/llms-full.txt)
- **Next:** [TextFrame.Drawings Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframe/drawings-property/llms-full.txt)
