Tag editing in a WPF TextBox

后端 未结 2 1994
我寻月下人不归
我寻月下人不归 2020-12-13 04:50

I want to implement a custom TextBox that will allow me to edit tags. Hotmail\'s \"To\" TextBox is the best example I can think of:

相关标签:
2条回答
  • 2020-12-13 05:05

    I believe this Tokenizing control does most of what you're looking for:

    http://blog.pixelingene.com/2010/10/tokenizing-control-convert-text-to-tokens/

    0 讨论(0)
  • 2020-12-13 05:09

    I'd try the following:

    • implement a TagEditor, which has the functionality to edit a single Tag (based on an AutoComplete TextBox that is swapped with a TextBlock once an existing Tag has been recognized or editing is ended)

    • create an DataTemplate that uses the TagEditor

    • create an ItemsControl that utilizes the DataTemplate

    that breaks it down to three challenges, of which only the first is a bit tricky, but solveable with the given keywords and stackoverflow ;-)

    0 讨论(0)
提交回复
热议问题