Code Monkey home page Code Monkey logo

wpf-spreadsheet-spell-check-cell-text's Introduction

Spreadsheet for WPF – Spell Check Text in a Cell Editor

This example demonstrates how to use the DevExpress Spell Checker component to check spelling in spreadsheet cells. When a user types text in a cell, the spell checker indicates misspelled words with a red wavy line. The user can right-click an underlined word and select the correct spelling from the list of suggestions or invoke the Spelling dialog.

Spreadsheet - Spell Checking

This example uses the default English dictionary to check cell text. Refer to the following help topic for information on how to add dictionaries for other languages to the Spell Checker: Spell Checker Dictionaries.

Implementation Details

Follow the steps below to integrate a spell checker into the Spreadsheet application:

  1. Configure the Spreadsheet control’s DXSpellChecker behavior in XAML:

    <dxsps:SpreadsheetControl>
         <mvvm:Interaction.Behaviors>
                <local:SpreadsheetSpellChecker 
                    CheckAsYouType="True" 
                    ShowSpellCheckMenu="True" 
                    Culture="en-US" />
         </mvvm:Interaction.Behaviors>
    </dxsps:SpreadsheetControl>
  2. Call the SpellingSettings.RegisterTextControl method to enable spell check for the control used as the default cell editor (the System.Windows.Controls.TextBox descendant). See this topic for details: Register Custom Control to Enable Spell Checking.

    SpellingSettings.RegisterTextControl(typeof(XpfCellInplaceEditor));
    
  3. Handle the SpreadsheetControl.CellEditorOpened event to access the active cell editor. Use the SpellChecker.Check method to check text in the editor.

  4. Handle the SpellChecker.CheckCompleteFormShowing event to suppress the appearance of this dialog box: Spell check is complete.

Files to Look At

More Examples

wpf-spreadsheet-spell-check-cell-text's People

Contributors

natalyasenichkina avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.