# HeaderFooter.SubTextParts Property

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

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

---

### Description

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

### Syntax

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

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

### Examples

The following example creates a header for the first section and configures its content or layout by using `HeaderFooter.SubTextParts`.

```csharp
HeaderFooterCollection headers = textControl.Sections[1].HeadersAndFooters;
headers.Add(HeaderFooterType.Header);
HeaderFooter headerFooter = headers.GetItem(HeaderFooterType.Header);
headerFooter.Selection.Text = "Quarterly report";

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

```vbnet
Dim headers As HeaderFooterCollection = textControl.Sections(1).HeadersAndFooters
headers.Add(HeaderFooterType.Header)
Dim headerFooter As HeaderFooter = headers.GetItem(HeaderFooterType.Header)
headerFooter.Selection.Text = "Quarterly report"

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

### Limitations

Read only.

---

## Nearby

- **Previous:** [HeaderFooter.Selection Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/headerfooter/selection-property/llms-full.txt)
- **Next:** [HeaderFooter.Tables Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/headerfooter/tables-property/llms-full.txt)
