O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling the Suggestion List

AutoCompleteBox allows you to customize the presentation of suggestion items using its ItemTemplate property.

Sample code for this section is located in the AutoCompleteBoxTemplatedView and AutoCompleteBoxTemplatedViewModel.

So far a string has been used to represent suggestion items. This section uses a custom SuggestionItem class to demonstrate more complex data binding and styling features (see Listing 9.2).

LISTING 9.2. SuggestionItem Class

public class SuggestionItem{    public string Name { get; private set; }    public string Description { get; private set; }    public SuggestionItem(string name, string description)    {        Name = name;        Description = description;    } ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required