Accepting Multiple Items in a Silverlight AutoCompleteBox

982 views Asked by At

I have a Silverlight 4 application. In this application I am using the AutoCompleteBox. Essentially, I am trying to create the functionality similar to the "Tags" autocomplete box on StackOverflow. I can successfully get the my AutoCompleteBox working for the first item. However, I do not see how to implement a seperator and make the drop down appear on subsequent items.

Can somebody please help me?

Thank you!

1

There are 1 answers

0
AntSlay On

Create a horizontal listbox with listboxitems of autocompleteboxes.

  1. Whenever a space is pressed, add a autocompletebox to the listbox itemsource source and focus in on the new autocompletebox.
  2. Pressing backspace in an empty autocompletebox will remove the last autocompletebox and focus in on the (now) last autocompletebox in the list.

To make it easier, skip the horizontal part until you get the functionality working. Styling the ItemsPanel of the listbox will probably get you the horizontal listbox you will want.