Prev | Current Page 393 | Next

Matthew MacDonald

"Pro WPF with VB 2008: Windows Presentation Foundation with .NET 3.5"

The spelling checker determines what dictionary to use based on the input language
that??™s configured for the keyboard. You can override this default by setting the Language property
of the TextBox, which is inherited from the FrameworkElement class, or you can set the
xml:lang attribute on the element.
CHAPTER 7 n CLASSIC CONTROLS 208
Figure 7-7. Spell-checking a text box
Unfortunately, the spelling checker is not customizable in any way. It contains only one
additional property (SpellingReform), which determines whether post-1990 spelling rule
changes are applied to French and German languages. Another useful feature of the TextBox
control is Undo, which allows the user to reverse recent changes. The Undo feature is available
programmatically (using the Undo() method), and it??™s available using the Ctrl+Z keyboard
shortcut, as long as the CanUndo property has not been set to False.
nTip When manipulating text in the text box programmatically, you can use the BeginChange() and
EndChange() methods to bracket a series of actions that the TextBox will treat as a single ???block??? of
changes. These actions can then be undone in a single step.
The PasswordBox
The PasswordBox looks like a TextBox, but it displays a string of circle symbols to mask the
characters it shows. (You can choose a different mask character by setting the PasswordChar
property.


Pages:
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405