metro app xaml Autocompletebox? RRS feed

  • Question

  • Hi

    Does anyone knows the best way to implement an Autocompletebox in vs 11 xaml metro app project?


    • Edited by lmlange Tuesday, March 6, 2012 6:55 PM
    Tuesday, March 6, 2012 6:54 PM


  • Hi lmlange,

    The basic concept is fairly simple, but the details can get somewhat complex. You might want to look up existing implementations of similar controls for ideas. The Silverlight Toolkit's AutoCompleteBox is probably a good start.

    More or less what you will want to do is to handle text changes and compare the text in the TextBox with your auto-complete candidate list. If it matches one of the candidates, then insert and select the rest of the candidate text.

    Off the top of my head, gotchas will be to make sure you only auto-complete based on the text the user enters and not the text you programmatically enter and not to auto-complete when the user is backspacing out of a selection.


    Wednesday, March 7, 2012 5:02 AM