Assembly: PresentationFramework (in PresentationFramework.dll)
Thetype exposes the following members.
|CustomDictionaries||Gets the collection of lexicon file locations that are used for custom spell checking.|
|IsEnabled||Gets or sets a value that determines whether the spelling checker is enabled on this text-editing control, such as TextBox or RichTextBox.|
|SpellingReform||Gets or sets the spelling reform rules that are used by the spelling checker.|
|Equals(Object)||Determines whether the specified Object is equal to the current Object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetCustomDictionaries||Gets the collection of lexicon file locations that are used for custom spelling checkers on a specified text-editing control.|
|GetHashCode||Serves as a hash function for a particular type. (Inherited from Object.)|
|GetIsEnabled||Returns a value that indicates whether the spelling checker is enabled on the specified text-editing control.|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|SetIsEnabled||Enables or disables the spelling checker on the specified text-editing control, such as TextBox or RichTextBox.|
|SetSpellingReform||Determines the spelling reform rules that are used by the spelling checker.|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
To enable the spelling checker, set the SpellCheck.IsEnabled property to true on a text-editing control. When this spelling checker is enabled, misspelled words are underlined by using a red wavy line, as shown in the following illustration. Spelling checker is supported only when WPF provides a default dictionary. In .NET Framework 4, WPF provides dictionaries for English, French, German, and Spanish.
To add a custom dictionary, add the location of the lexicon file to the CustomDictionaries collection.
Imports System Imports System.Windows Imports System.Windows.Controls Namespace SDKSample Partial Public Class SpellCheckExample Inherits Page Public Sub New() Dim myStackPanel As New StackPanel() 'Create TextBox Dim myTextBox As New TextBox() myTextBox.Width = 200 ' Enable spellchecking on the TextBox. myTextBox.SpellCheck.IsEnabled = True ' Alternatively, the SetIsEnabled method could be used ' to enable or disable spell checking like this: ' SpellCheck.SetIsEnabled(myTextBox, True) myStackPanel.Children.Add(myTextBox) Me.Content = myStackPanel End Sub End Class End Namespace
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.