So powerful is WPF that you can write, in less than 20 lines of markup (with zero code behind), a simple text editor... with spell checking!
All you need do is put the following XAML into your favourite text editor and compile:
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SimpleXAMLTextEditor" Height="300" Width="300">
This produces a very simple application:
No code is required because the WPF team have already implemented the standard edit commands[*] for the TextBox and RichTextBox controls. You also get spelling for free by just adding one attribute.
Do the WPF team rock or what!
[*] For more on commands check out my previous post on the subject.
3 comments:
Wow thats a great example, Ta.
Great example!
Great Example!
Post a Comment