Skip to main content
A newer version of this page is available.

SpellCheckerBase.SaveToRegistry(String) Method

Serializes the spell checker object and saves the data into the registry.

Namespace: DevExpress.XtraSpellChecker

Assembly: DevExpress.SpellChecker.v18.2.Core.dll

Declaration

public void SaveToRegistry(
    string path
)

Parameters

Name Type Description
path String

A String object, representing a path to the registry key that holds the data.

Remarks

You can write the SpellChecker options in the following root keys:

  • “HKEY_CLASSES_ROOT”
  • “HKEY_CURRENT_USER” (default key)
  • “HKEY_USERS”
  • “HKEY_LOCAL_MACHINE”
  • “HKEY_CURRENT_CONFIG”

Use the following code to get the “Test” subkey in “HKEY_CURRENT_USER”. the “Test” subkey contains the “Spelling” key with the required data.


spellChecker1.SaveToRegistry(@"Test\\Spelling");

The code sample below gets the Test subkey in “HKEY_LOCAL_MACHINE”. The subkey contains the Spelling key with your data.


spellChecker1.SaveToRegistry("HKEY_LOCAL_MACHINE\\SOFTWARE\\Test\\Spelling");

Note

Before saving to the RegistryKey, make sure you have permission to write to the corresponding registry.

When calling the SaveToRegistry method, the SpellChecker attempts to serialize data using the RegistryXtraSerializer. This serializer tries to find the key by the specified path, removes the key if it’s found and then, creates a new key and writes the required data there.

Call the SpellCheckerBase.RestoreFromRegistry method to restore the saved options.

See Also