New to Telerik UI for WinForms? Start a free 30-day trial

Stores custom words in isolated storage and indexes them for exact and phonetic lookup.

Definition

Constructors

Creates a dictionary in the default isolated-storage scope using DefaultDictionaryName. Existing words are loaded from that file when it is present.

C#
public RadIsolatedStorageCustomDictionary()

Creates a dictionary using the specified isolated-storage scope and file name, then loads existing words from that file.

C#
public RadIsolatedStorageCustomDictionary(IsolatedStorageScope storageScope, string customDictionaryName)
Parameters:storageScopeIsolatedStorageScope

The isolated-storage scope to use.

customDictionaryNamestring

The file name used to store the custom words.

Exceptions: NotSupportedException

storageScope is not Application.

Creates a dictionary in the specified isolated-storage scope using DefaultDictionaryName.

C#
public RadIsolatedStorageCustomDictionary(IsolatedStorageScope storageScope)
Parameters:storageScopeIsolatedStorageScope

The isolated-storage scope to use.

Exceptions: NotSupportedException

storageScope is not Application.

Fields

Gets the file name used by the parameterless constructor for custom words.

C#
public static readonly string DefaultDictionaryName

Gets the storage scope used by the parameterless constructor.

C#
public static readonly IsolatedStorageScope DefaultIsolatedStorageScope

Properties

Gets or sets whether successful word additions, removals, and clears are automatically written to isolated storage. The constructors enable this by default; when disabled, call UpdateIsolatedStorage() to persist changes.

C#
public bool AutoUpdateIsolatedStorage { get; set; }

Methods

Adds the lowercase spelling when it is not already present. When automatic updates are enabled, persists the change and raises DataChanged; otherwise the change remains in memory without that notification.

C#
public void AddWord(string word)
Parameters:wordstring

The spelling to add.

Implements: ICustomWordDictionary.AddWord(string)

Removes all words. If the dictionary was not empty, optionally persists the change and raises DataChanged.

C#
public void ClearWords()

Releases the isolated-storage file handle used by this dictionary.

C#
public void Dispose()

Implements: IDisposable.Dispose()

Loads non-empty lines from the configured isolated-storage file into the in-memory dictionary when the file exists.

C#
public void ReadIsolatedStorage()

Removes the lowercase spelling when present, persists the change when automatic updates are enabled, and raises DataChanged.

C#
public void RemoveWord(string word)
Parameters:wordstring

The spelling to remove.

Implements: ICustomWordDictionary.RemoveWord(string)

Recreates the configured isolated-storage file and writes the current custom words, one word per line.

C#
public void UpdateIsolatedStorage()