SpellCheck 类

定义

向文本编辑控件(如 TextBoxRichTextBox)提供实时拼写检查功能。Provides real-time spell-checking functionality to text-editing controls, such as TextBox and RichTextBox.

public ref class SpellCheck sealed
public sealed class SpellCheck
type SpellCheck = class
Public NotInheritable Class SpellCheck
继承
SpellCheck

注解

若要启用拼写检查器, 请SpellCheck.IsEnabled在文本true编辑控件上将属性设置为。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. 仅当 WPF 提供默认字典时, 才支持拼写检查器。Spelling checker is supported only when WPF provides a default dictionary. .NET Framework 4.NET Framework 4中, WPF 提供英语、法语、德语和西班牙语的字典。In .NET Framework 4.NET Framework 4, WPF provides dictionaries for English, French, German, and Spanish.

带有拼写-检查的 TextboxTextbox with spell-checking

若要添加自定义字典, 请将词典文件的位置添加到CustomDictionaries集合中。To add a custom dictionary, add the location of the lexicon file to the CustomDictionaries collection.

字段

CustomDictionariesProperty

标识 CustomDictionaries 依赖项属性。Identifies the CustomDictionaries dependency property.

IsEnabledProperty

标识 IsEnabled 依赖项属性。Identifies the IsEnabled dependency property.

SpellingReformProperty

标识 SpellingReform 依赖项属性。Identifies the SpellingReform dependency property.

属性

CustomDictionaries

获取用于自定义拼写检查的词典文件位置的集合。Gets the collection of lexicon file locations that are used for custom spell checking.

IsEnabled

获取或设置一个值,该值确定是否对此文本编辑控件(如 TextBoxRichTextBox)启用拼写检查器。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.

(继承自 Object)
GetCustomDictionaries(TextBoxBase)

获取词典文件位置的集合,这些词典文件用于指定的文本编辑控件上的自定义拼写检查器。Gets the collection of lexicon file locations that are used for custom spelling checkers on a specified text-editing control.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetIsEnabled(TextBoxBase)

返回一个值,该值指示是否对指定的文本编辑控件启用拼写检查器。Returns a value that indicates whether the spelling checker is enabled on the specified text-editing control.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
SetIsEnabled(TextBoxBase, Boolean)

对指定的文本编辑控件(如 TextBoxRichTextBox)启用或禁用拼写检查器。Enables or disables the spelling checker on the specified text-editing control, such as TextBox or RichTextBox.

SetSpellingReform(TextBoxBase, SpellingReform)

确定拼写检查器使用的拼写改革规则。Determines the spelling reform rules that are used by the spelling checker.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于