# DocumentTargetEventArgs.DocumentTarget Property

> Gets an object that represents the document target which causes the event. It is of the type DocumentTarget.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.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 > DocumentTargetEventArgs.DocumentTarget Property
- **343 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttargeteventargs/documenttarget-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttargeteventargs/documenttarget-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttargeteventargs/documenttarget-property/llms-full.txt

---

### Description

Gets an object that represents the document target which causes the event. It is of the type [DocumentTarget](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttarget/llms-full.txt).

### Syntax

```csharp
public DocumentTarget DocumentTarget { get; }
```

```vbnet
Public ReadOnly Property DocumentTarget As DocumentTarget
```

### Examples

The following example uses `DocumentTargetEventArgs.DocumentTarget` while handling `DocumentTargetCreated`.

```csharp
textControl.DocumentTargetCreated += (_, e) =>
{
    e.DocumentTarget?.ScrollTo();
};
```

```vbnet
AddHandler textControl.DocumentTargetCreated,
    Sub(sender, e)
        If e.DocumentTarget IsNot Nothing Then e.DocumentTarget.ScrollTo()
    End Sub
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [DocumentTargetEventArgs Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/documenttargeteventargs/llms-full.txt)
- **Next:** [EditableRegion Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/editableregion/llms-full.txt)
