TX Spell .NET for WPF

OpenOfficeDictionary Class

Class
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
Inherits
  1. Dictionary
  2. OpenOfficeDictionary

Description

The OpenOfficeDictionary class represents a dictionary that gets its content from a Hunspell Open Source dictionary. As with all dictionaries of type Dictionary, the content of the dictionary is only accessed when the dictionary is added to the TXSpell.Dictionaries collection. The first implementation loads a Hunspell Open Source dictionary from a file that is defined by a dictionary path. Using the dictionary name only without a file path, the corresponding dictionary file of the default dictionary folder is used. The second constructor loads a dictionary from string arrays that represent the content of a Hunspell Open Source dictionary and the corresponding affix file. It is recommended to create these arrays by using the encoding that is defined in the corresponding affix file represented by the "SET"-Flag. Using this implementation, it is also required to define the language of the dictionary by setting the System.Globalization.CultureInfo language parameter that sets the Proofing.Dictionary.Language property automatically. It is inherited from the abstract class Dictionary.

Syntax

public sealed class OpenOfficeDictionary : Dictionary

Examples

The following example creates an Open Office Dictionary instance and configures its display name setting for a document workflow.

TXTextControl.Proofing.OpenOfficeDictionary openOfficeDictionary = new("document.docx");
openOfficeDictionary.DisplayName = "CustomerName";

Members

Constructors

ConstructorDescription
OpenOfficeDictionaryInitializes a new instance of the OpenOfficeDictionary class.

Properties

PropertyDescription
DictionaryEncodingGets or sets the dictionary's encoding. (Inherited from Dictionary.)
DisplayNameGets or sets the text that is displayed for the dictionary inside the options dialog or the SpellCheckDialog's SuggestionDictionaryComboBox. The default value is the name of the dictionary. (Inherited from Dictionary.)
IsGetSuggestionsEnabledGets or sets a value that indicates whether suggestions are created using this dictionary or not. The default value is true. (Inherited from Dictionary.)
IsSelectedAsDefaultGets a value indicating whether the dictionary is selected as the default dictionary by the Language property. The default value is false. (Inherited from Dictionary.)
IsSpellCheckingEnabledGets or sets a value indicating whether spell checking of this dictionary is enabled or not. The default value is true. (Inherited from Dictionary.)
LanguageGets or sets the dictionary's language. (Inherited from Dictionary.)
NameGets or sets the dictionary's name. (Inherited from Dictionary.)
ShowInOptionsDialogGets or sets a value indicating whether the dictionary is shown in the options dialog. The default value is true. (Inherited from Dictionary.)