TX Spell .NET for WPF

PreviewHandler Class

Class|Introduced in 6.0
Namespace
TXTextControl.Proofing
Package
TXTextControl.TXSpell.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXSpell.dll
Install
dotnet add package TXTextControl.TXSpell.WPF.SDK .NET 8 and later. For .NET Framework, reference TXSpell.dll from the setup.
Also in
TXTextControl.TXSpell.Core.SDK as TXSpell.dll
Implements
INotifyPropertyChanged

Description

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

Syntax

public sealed class SpellingCorrectionUIProvider.PreviewHandler : 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.

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

Members

Properties

PropertyDescription
IsPreviewSentenceBoundsEnabledGets a value whether the PreviewSentenceBounds property is enabled to provide the sentence bounds for the current word to correct.
PreviewSentenceBoundsGets 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.

Events

EventDescription
PropertyChangedNot described in the reference. public event PropertyChangedEventHandler PropertyChanged;