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.v23.2.dll
NuGet Package: DevExpress.Wpf.SpellChecker
Declaration
public static IEnumerable<SpellCheckerCommand> GetErrorOperationCommands(
this DependencyObject editor,
int position
)
Parameters
Name | Type | Description |
---|---|---|
editor | DependencyObject | A target editor. |
position | Int32 | A position 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:
<TextBox x:Name="textBox" PreviewMouseRightButtonUp="TextBox_PreviewMouseRightButtonUp">
<TextBox.ContextMenu>
<ContextMenu ItemsSource="{Binding Path=MenuItems}"/>
</TextBox.ContextMenu>
<dxmvvm:Interaction.Behaviors>
<dxspch:DXSpellChecker Culture="en-US" CheckAsYouType="True"/>
</dxmvvm:Interaction.Behaviors>
</TextBox>
See Also