# ServerTextControl.TextParts Property

> Gets a collection of all text parts the current document contains. The property's value is an object of the type TextPartCollection. A text part can be the main text, a text frame or a header or footer.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 16.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > ServerTextControl.TextParts Property
- **344 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textparts-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textparts-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textparts-property/llms-full.txt

---

### Description

Gets a collection of all text parts the current document contains. The property's value is an object of the type [TextPartCollection](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/textpartcollection/llms-full.txt). A text part can be the main text, a text frame or a header or footer.

### Syntax

```csharp
public TextPartCollection TextParts { get; }
```

```vbnet
Public ReadOnly Property TextParts As TextPartCollection
```

### Examples

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

```csharp
foreach (object item in textControl.TextParts)
{
    Console.WriteLine(item);
}
```

```vbnet
For Each item As Object In textControl.TextParts
    Console.WriteLine(item)
Next
```

### Limitations

Runtime only.

Read only.

---

## Nearby

- **Previous:** [ServerTextControl.TextFrames Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/textframes-property/llms-full.txt)
- **Next:** [ServerTextControl.TrackedChangeCreated Event](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/servertextcontrol/trackedchangecreated-event/llms-full.txt)
