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

SpellingExtensions.GetErrorOperationCommands(DependencyObject, Point) Method

Creates a list of commands available for the misspelled or repeatedword at the specified point in the given editor.

Namespace: DevExpress.Xpf.SpellChecker

Assembly: DevExpress.Xpf.SpellChecker.v19.1.dll

Declaration

public static IEnumerable<SpellCheckerCommand> GetErrorOperationCommands(
    this DependencyObject editor,
    Point point
)
<ExtensionAttribute>
Public Shared Function GetErrorOperationCommands(
    editor As DependencyObject,
    point As Point
) As IEnumerable(Of SpellCheckerCommand)

Parameters

Name Type Description
editor DependencyObject

A target editor.

point Point

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

Returns

Type Description
IEnumerable<SpellCheckerCommand>

A list of error commands available for the target word.

Remarks

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:

<RichTextBox x:Name="richTextBox" PreviewMouseRightButtonUp="RichTextBox_PreviewMouseRightButtonUp">
    <RichTextBox.ContextMenu>
        <ContextMenu ItemsSource="{Binding Path=MenuItems}"/>
    </RichTextBox.ContextMenu>
    <dxmvvm:Interaction.Behaviors>
        <dxspch:DXSpellChecker Culture="en-US" CheckAsYouType="True"/>
    </dxmvvm:Interaction.Behaviors>
</RichTextBox>
See Also