Predictive typing functionality in WPF
Predictive typing is a handy feature on many mobile phones.
How would/can you implement pr开发者_开发技巧edictive typing in WPF?
Predictive Typing is really a separate concern from the display of the predicted string.
You'd implement the predictive typing algorithm, then just use WPF to display the options. In terms of display, there are many alternatives, including using Popup, a separate TextBlock, a custom control (to show the "predicted" text after the current entry point, etc. This could mainly be a control that just takes a standard TextBox and templates it with the prediction over the top/after/etc.
Be aware, though, that T9 is a patented algorithm, licensed by most phone vendors - so you may run into patent issues implementing your own versions....
精彩评论