# SpellingCorrectionUIProvider.StateManager.CurrentTextControl Property

> Gets an object of type TXTextControl.TextControl and represents that TextControl which is currently handled by the SpellingCorrectionUIProvider. This property can be set by calling the SetCurrent(object textControl) method. Furthermore, it will be set to null by calling the SetCurrent(object textControl) method with a null parameter, setting the CurrentText property or using the Cancel method.

- **Product:** TX Spell .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 6.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WPF.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TXSpell.Core.SDK` (assembly `TXSpell.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXSpell.dll` from the setup
- **Path:** TX Spell .NET for WPF > Reference > TXTextControl.Proofing > SpellingCorrectionUIProvider.StateManager.CurrentTextControl Property
- **467 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currenttextcontrol-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currenttextcontrol-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currenttextcontrol-property/llms-full.txt

---

### Description

Gets an object of type `TXTextControl.TextControl` and represents that TextControl which is currently handled by the [SpellingCorrectionUIProvider](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/txspell/spellingcorrectionuiprovider-property/llms-full.txt). This property can be set by calling the [SetCurrent(object textControl)](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/setcurrent-method/llms-full.txt) method. Furthermore, it will be set to null by calling the SetCurrent(object textControl) method with a null parameter, setting the [CurrentText](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currenttext-property/llms-full.txt) property or using the [Cancel](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/cancel-method/llms-full.txt) method.

### Syntax

```csharp
public object CurrentTextControl { get; }
```

```vbnet
Public ReadOnly Property CurrentTextControl As Object
```

### Examples

The following example includes the current text control value in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Current Text Control: {stateManager.CurrentTextControl}");
Console.WriteLine("State Manager is ready for use.");
```

```vbnet
Console.WriteLine($"Current Text Control: {stateManager.CurrentTextControl}")
Console.WriteLine("State Manager is ready for use.")
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [SpellingCorrectionUIProvider.StateManager.CurrentText Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currenttext-property/llms-full.txt)
- **Next:** [SpellingCorrectionUIProvider.StateManager.CurrentWordToCorrect Property](https://docs.textcontrol.com/tx-spell-dotnet-wpf/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-statemanager/currentwordtocorrect-property/llms-full.txt)
