# ServerTextControl.SubTextParts Property

> Gets a collection of all subtextparts contained in the document. The property's value is an object of the type SubTextPartCollection.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 23.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ServerTextControl.SubTextParts Property
- **344 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/subtextparts-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/subtextparts-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/subtextparts-property/llms-full.txt

---

### Description

Gets a collection of all subtextparts contained in the document. The property's value is an object of the type [SubTextPartCollection](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpartcollection/llms-full.txt).

### Syntax

```csharp
public SubTextPartCollection SubTextParts { get; }
```

```vbnet
Public ReadOnly Property SubTextParts As SubTextPartCollection
```

### Examples

The following example iterates through the sub text parts collection and processes each sub text part.

```csharp
foreach (SubTextPart subTextPart in textControl.SubTextParts)
{
    subTextPart.Name = "CustomerName";
}
```

```vbnet
For Each subTextPart As SubTextPart In textControl.SubTextParts
    subTextPart.Name = "CustomerName"
Next
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [ServerTextControl.SubTextPartDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/subtextpartdeleted-event/llms-full.txt)
- **Next:** [ServerTextControl.TableCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/tablecreated-event/llms-full.txt)
