# SpellingCorrectionUIProvider.PreviewHandler Class

> The PreviewHandler class provides properties which are necessary to construct an editable preview for a spelling correction user interface.

- **Product:** TX Spell .NET for Windows Forms
- **Section:** Reference
- **Kind:** Class
- **Introduced:** 6.0
- **Namespace:** `TXTextControl.Proofing`
- **Package:** `TXTextControl.TXSpell.WinForms.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
- **Implements:** `System.ComponentModel.INotifyPropertyChanged`
- **Path:** TX Spell .NET for Windows Forms > Reference > TXTextControl.Proofing > SpellingCorrectionUIProvider.PreviewHandler Class
- **626 words**
- **Web URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/
- **LLMs URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/llms-full.txt

---

### Description

The PreviewHandler class provides properties which are necessary to construct an editable preview for a [spelling correction user interface](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider/llms-full.txt).

### Syntax

```csharp
public sealed class SpellingCorrectionUIProvider.PreviewHandler : INotifyPropertyChanged
```

```vbnet
Public NotInheritable Class SpellingCorrectionUIProvider.PreviewHandler
    Implements INotifyPropertyChanged
```

### Examples

The following example includes the is preview sentence bounds enabled value from a Preview Handler object in application diagnostics. The created object is then available to the surrounding document workflow.

```csharp
Console.WriteLine($"Is Preview Sentence Bounds Enabled: {previewHandler.IsPreviewSentenceBoundsEnabled}");
Console.WriteLine("Preview Handler is ready for use.");
```

```vbnet
Console.WriteLine($"Is Preview Sentence Bounds Enabled: {previewHandler.IsPreviewSentenceBoundsEnabled}")
Console.WriteLine("Preview Handler is ready for use.")
```

---

## In This Section

- [SpellingCorrectionUIProvider.PreviewHandler.IsPreviewSentenceBoundsEnabled Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/ispreviewsentenceboundsenabled-property/llms-full.txt): Gets a value whether the PreviewSentenceBounds property is enabled to provide the sentence bounds for the current word to correct.
- [SpellingCorrectionUIProvider.PreviewHandler.PreviewSentenceBounds Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/previewsentencebounds-property/llms-full.txt): Gets a two values integer array that represents the start position and length of the sentence where the current word to correct is located. This property is redetermined on every change of the CurrentWordToCorrect property.

---

## Nearby

- **Previous:** [SpellingCorrectionUIProvider.CorrectionHandling Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider/correctionhandling-property/llms-full.txt)
- **Next:** [SpellingCorrectionUIProvider.PreviewHandler.IsPreviewSentenceBoundsEnabled Property](https://docs.textcontrol.com/tx-spell-dotnet-winforms/reference/txtextcontrol-proofing/spellingcorrectionuiprovider-previewhandler/ispreviewsentenceboundsenabled-property/llms-full.txt)
