Como: Enable Spell Checking in a Text Editing Control

O exemplo a seguir mostra como habilitar verificação ortográfica em tempo real num TextBox utilizando a propriedade IsEnabled da classe SpellCheck.

Exemplo

<Page xmlns="https://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="https://schemas.microsoft.com/winfx/2006/xaml">

  <StackPanel>
    <TextBox SpellCheck.IsEnabled="True" Name="myTextBox"></TextBox>
  </StackPanel>

</Page>
using System;
using System.Windows;
using System.Windows.Controls;

namespace SDKSample
{
    public partial class SpellCheckExample : Page
    {
        public SpellCheckExample()
        {
            StackPanel myStackPanel = new StackPanel();

            //Create TextBox
            TextBox myTextBox = new TextBox();
            myTextBox.Width = 200;

            // Enable spellchecking on the TextBox.
            myTextBox.SpellCheck.IsEnabled = true;

            // Alternatively, the SetIsEnabled method could be used
            // to enable or disable spell checking like this:
            // SpellCheck.SetIsEnabled(myTextBox, true);

            myStackPanel.Children.Add(myTextBox);
            this.Content = myStackPanel;
        }
    }
}

Consulte também

Tarefas

Como: Usar verificar de ortografia com um Context Menu

Conceitos

Visão geral sobre TextBox

Visão geral de RichTextBox