A newer version of this page is available. Switch to the current version.

SpellingExtensions.GetErrorOperationCommands(DependencyObject, Int32) Method

Creates a list of commands available for the misspelled or repeated word at the specified position in the given editor.

Namespace: DevExpress.Xpf.SpellChecker

Assembly: DevExpress.Xpf.SpellChecker.v18.2.dll


public static IEnumerable<SpellCheckerCommand> GetErrorOperationCommands(
    this DependencyObject editor,
    int position
Public Shared Function GetErrorOperationCommands(
    editor As DependencyObject,
    position As Integer
) As IEnumerable(Of SpellCheckerCommand)


Name Type Description
editor DependencyObject

A target editor.

position Int32

A position in the editor the misspelled or repeated word occupies.


Type Description

A list of error commands available for the target word.


The returned list depends on the type of misspelling and current spellchecker operation mode.

Use the GetSpellCheckError method to invoke a custom context menu for misspelled or repeated words, as shown below:

<TextBox x:Name="textBox" PreviewMouseRightButtonUp="TextBox_PreviewMouseRightButtonUp">
            <ContextMenu ItemsSource="{Binding Path=MenuItems}"/>
            <dxspch:DXSpellChecker Culture="en-US" CheckAsYouType="True"/>
See Also