SpellCheck Class
.NET Framework 3.0
Provides real-time spell checking functionality to text editing controls, including TextBox and RichTextBox.
Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
System.Windows.Controls Namespace
TextBox Overview
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
The following example shows how to enable real-time spellchecking in a TextBox using the IsEnabled property of the SpellCheck class.
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://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; } } }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Reference
SpellCheck MembersSystem.Windows.Controls Namespace
Other Resources
RichTextBox OverviewTextBox Overview
Community Additions
ADD
Show: