This category lets you enable spell checking for WPF text boxes within any Visual Studio tool window or designer/editor. Exclusion expressions can be added to disable spell checking in text boxes in which it is not appropriate or not wanted.
To enable the option, check the checkbox. To disable this option, uncheck the checkbox. The change becomes effectively immediately once the global configuration is saved. If disabled, the event used to connect the spell checker will remain active for the current session but will do nothing. Restart Visual Studio to disable it completely.
Exclusion expressions consist of a regular expression that is used to match one or more fully qualified control names. Since text boxes and their parent controls are not always named, the window GUID or type name is used to prefix all IDs. The remainder of the ID consists of as many IDs as are present in the text box's parent control hierarchy. While this results in some very long names, it does help ensure that the IDs are unique and will be matched to the correct control. Quantifiers within the regular expression can be used to match multiple controls with common prefixes.
To add a new expressions, click the Add button. A dialog box will appear in which you can enter the expression and indicate which options if any should be used with it. The Ignore Case option is really the only useful option here. The Multi-line and Single Line options will not have any effect. A comment can also be entered to describe the entry. To edit an expression, select it in the list and click the Edit button or double click it. The same dialog box will appear in which you can modify the expression settings. To remove an expression, select it in the list and click the Remove button. To reset the list to the default set of ignored Visual Studio control IDs, click the Default button.
vsspell_enable_wpf_text_box_spell_checking = [true|false]
vsspell_visual_studio_id_exclusions = [regEx1(?@@PND@@/Options/)]...
These option only have an effect in the global spell checker configuration file.
regEx1(?@@PND@@/Options/)... = One or more regular expressions to use and their options.As noted, spell checking will only be available in WPF text boxes. If the tool window or editor uses standard Windows text boxes, spell checking will not occur. You can typically tell the type of text box by right clicking in it to bring up the context menu. If the only options available are Cut, Copy, and Paste it is most likely a WPF text box. If you see other options for setting the reading order, inserting Unicode characters, and Open IME, it is most likely a standard Windows text box and will not be supported.
Spell checking will not occur until the text box actually gains the keyboard focus. Once it does, any misspelled words will be underlined. Right click on a misspelled word to show the context menu. It will contain any suggested replacements, an option to add the word to the global dictionary, and an option to ignore the word. See below for known issues and limitations.
There are many standard tool windows and dialog boxes in Visual Studio as well as many more provided by third-party extensions. It is almost certain that you will run across a text box in which spell checking is enabled but it is not appropriate. You can use the exclusion expression options described above to exclude all of the tool window controls or just specific ones within it. In order to get the control ID, hold down the Left Control key and right click in the text box. An extra Copy Name to Clipboard option will be shown in the context menu. Select it and the control name will be copied to the clipboard. You can then use the global configuration editor to add the ID or an expression based on it to exclude the unwanted text boxes.
The IDs are always prefixed with the tool windows GUID or the dialog box's type name. You can use the ID as given or use the regular expression options to exclude all or selected text boxes from being spell checked based on one or more parts of the ID. The default IDs supplied with the spell checker show various examples.
The following are the known issues and limitations with the WPF text box spell checking option.
Other Resources
Configuration Options