C1.Silverlight.SpellChecker Namespace > C1SpellChecker Class : BadWordFound Event |
'Declaration
Public Event BadWordFound As BadWordEventHandler
public event BadWordEventHandler BadWordFound
The event handler receives an argument of type BadWordEventArgs containing data related to this event. The following BadWordEventArgs properties provide information specific to this event.
Property | Description |
---|---|
BadWord | Gets a CharRange object that contains the bad word and its location within the text being spell-checked. |
BadWordList | Gets a CharRangeList that contains all errors detected in the text. |
Cancel | Gets or sets whether this bad word should be ignored by the C1SpellChecker. |
Control | Gets a reference to the control that is being spell-checked. |
Dialog | Gets a reference to the ISpellDialog that is being used to spell-check a control. |
This event fires when the component detects a spelling error in a control. This happens while a spell dialog is displayed (see the CheckControlAsync(Object) method) or while the component is painting the red wavy underlines that mark misspelled words in dynamic mode (see the SpellOptions.ActiveSpellingEnabled property).
The event parameters have a Dialog property that allow the handler to determine whether a spell dialog is being displayed or not.
The event parameters also have a Cancel property that can be used to ignore the error.
Note that this event fires every time a misspelled word is about to be underlined, which occurs whenever the control is painted (not just when the bad word is initially typed into the control. Because of this, one single misspelled word can cause this event to fire multiple times.
Target Platforms: 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