如何建立一个“逐字"WPF中的自动完成? [英] How to build a "word-by-word" autocomplete in WPF?

查看:37
本文介绍了如何建立一个“逐字"WPF中的自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了一些研究,最终得到了几个自动完成框,它们有一个共同点:它们都匹配输入的整个表达式.有时,它们似乎很容易扩展,但最终却并非如此.

I already did some research and ended up with several autocomplete boxes which have one thing in common: they all match the whole expression which has been entered. Sometimes, they seem to be easily expandable, but at the end, they aren't.

但是,我需要一个文本框,它允许用户输入一个单词(例如tag1"),显示一个带有一些建议的弹出窗口基于这个单词,用返回键接受建议并在同一个文本框中输入一个新词(例如tag1 tag2"),弹出窗口再次弹出.(我喜欢 CintaNotes 处理这个的方式)

However, I need a Textbox which allows the user to enter a word (e.g. "tag1"), displays a popup with some suggestions based on this single word, accept the suggestion with the return key and type in a new word (e.g "tag1 tag2") in the same textbox, with the popup popping up again. (I like the way CintaNotes handles this)

我需要这个用于标记界面.用户将标签写入一个简单的盒子通常会更快,但有时,他需要帮助.这就是自动完成的用途.

I need this for a tagging interface. It's often faster for the user to write the tags into a simple box, but sometimes, he needs assistance. This is what the autocomplete is for.

我发现了一些结果,但不符合我的目的(恕我直言):

I've found some results, which don't work for my purpose (imho):

顺便说一句,我真的很喜欢标签框的操作方式.

Btw, I really like the way the Tag-Box for SO operates.

有人有想法吗?某处是否有开箱即用"的解决方案,适合我的需求但我没有找到?还是我必须自己构建一个?

Does anyone have an idea? Is there a "out-of-the-box" - solution somewhere, which suits my needs but I didn't find? Or do I have to build one myself?

谢谢!:)

推荐答案

我想你的意思是一个自动完成多个单词的文本框.就像 WPF 扩展工具包上的 TokenizedTexbox.这是页面:http://wpftoolkit.codeplex.com/wikipage?title=TokenizedTextBox&referringTitle=Home

I think you mean a textbox which autocomplete for multiple words. Like TokenizedTexbox on WPF Extended Toolkit. this is the page: http://wpftoolkit.codeplex.com/wikipage?title=TokenizedTextBox&referringTitle=Home

这篇关于如何建立一个“逐字"WPF中的自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆