How to build a “word-by-word” autocomplete in WPF?

前端 未结 4 1804
臣服心动
臣服心动 2021-02-07 16:21

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, t

4条回答
  •  迷失自我
    2021-02-07 17:05

    If you have time, you can use the RichEditControl or TextBox and apply the same pattern used in Intellisense engine or Code Completation enabled editors: Hook the text changes events, Recogize context (last/current word) and display the options list on popup control. And optionally, on commit (detect acceptation or space key), apply the format to the word.

提交回复
热议问题