# SubTextPart.OuterMostSubTextPart Property

> Gets a subtextpart's outermost subtextpart. This is a top-level subtextpart with a nested level of 1. The property's value is an object of the type SubTextPart or null if this subtextpart is already a top-level subtextpart.

- **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 > SubTextPart.OuterMostSubTextPart Property
- **568 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/outermostsubtextpart-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/outermostsubtextpart-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/outermostsubtextpart-property/llms-full.txt

---

### Description

Gets a subtextpart's outermost subtextpart. This is a top-level subtextpart with a nested level of 1. The property's value is an object of the type [SubTextPart](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/llms-full.txt) or null if this subtextpart is already a top-level subtextpart.

### Syntax

```csharp
public SubTextPart OuterMostSubTextPart { get; }
```

```vbnet
Public ReadOnly Property OuterMostSubTextPart As SubTextPart
```

### Examples

The following example marks the selected customer name as a named document region by using `SubTextPart.OuterMostSubTextPart`.

```csharp
textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
SubTextPart subTextPart = new("CustomerName", 10);
textControl.SubTextParts.Add(subTextPart);

Console.WriteLine($"Outer Most Sub Text Part: {subTextPart.OuterMostSubTextPart}");
Console.WriteLine("Sub Text Part is ready for use.");
```

```vbnet
textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim subTextPart As New SubTextPart("CustomerName", 10)
textControl.SubTextParts.Add(subTextPart)

Console.WriteLine($"Outer Most Sub Text Part: {subTextPart.OuterMostSubTextPart}")
Console.WriteLine("Sub Text Part is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [SubTextPart.Number Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/number-property/llms-full.txt)
- **Next:** [SubTextPart.OuterSubTextPart Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/subtextpart/outersubtextpart-property/llms-full.txt)
