Click here to Skip to main content
14,027,192 members
Click here to Skip to main content
Add your own
alternative version


Posted 22 Nov 2010
Licenced CPOL

The ComboBox is Dead, Long Live the ListPicker

, 22 Nov 2010
Rate this:
Please Sign up or sign in to vote.
Bye ComboBox. Hello ListPicker


In this article, I am going to write about the ListPicker control.


The other day, I went and wrote a small app for WP7 (Windows Phone 7). The app wasn't very impressive so I won't be writing about that app.

What I wanted to write was about something that surprised me. I am pretty new to all this WP7 development, so I was kind of stumped when I found out that the phone does not have a ComboBox.

I found this to be rather odd, but could on the other hand understand that a ComboBox is probably not a control that is very well suited for a device like a phone. The OS itself seems to be using a list picker thingy instead, but that control seems to have stayed in Microsoft’s own control library and is not available. Is that so?

Using the Code

Actually WP7 has a ComboBox control. Although this control is not directly available from the Visual Studio toolbox (or the Expression Blend 4 for Windows Phone 7 toolbox for that matter), you can add it directly via XAML. It doesn’t look too appealing, especially if you use other Metro-styled controls in your application.

As you can see in the images above, the ComboBox doesn't look as you expect it to be.

In order to add it, you just use the following code:

<ComboBox Width="200" Height="100">
    <ComboBoxItem Content="aaa" />
    <ComboBoxItem Content="bbb" />
    <ComboBoxItem Content="ccc" />

This is the code I used in the above images.

Being frustrated, I started looking around the net to find a reasonable solution. The first solution that was good enough was this article talking about how to change your ComboBox control to be styled as a metro control.

Looking into this example, I realized that this can't be true. It can be debatable but as for UI and development, Microsoft has always done a good job providing all the tools needed.

I decided to keep checking and found a control called ListPicker.

ListPicker is a control that acts much like a ComboBox. Let me show you:

Much better. right?

In order for you to do this, all you need to do is use this code:

    <toolkit:ListPickerItem Content="aaa" />
    <toolkit:ListPickerItem Content="bbb" />
    <toolkit:ListPickerItem Content="ccc" />

And this code gives you the same effect as in the linked article and as you can see, it is very simple.

So what is toolkit? As mentioned in the official site:

A product of the Microsoft Silverlight team, the Silverlight Toolkit 
adds new functionality for designers, developers, and the community to 
provide an efficient way to help shape product development.  

It is a set of tools that has a high priority to be integrated in the next version of the development kit.

So what you need to do is download and install the latest available download (Silverlight for Windows Phone Toolkit - Nov 2010 while writing this article).

After the installation is done, what you need to do is add it to your project. I recommend adding it through the toolbox, but you could also do this through the references menu. Whatever does it for you.

If you decided to add the toolkit through the references menu, you need to add at the root element of the document the following line:


Just write xmlns:toolkit= and use the intellisense to complete.

Now add the above code and you are done.

Happy programming.

Points of Interest

I recommend the download of the toolkit event if you are not going to use the ListPicker. It is a set of useful controls that probably will be in the next release of Windows Phone 7 Development Kit.


  • 22nd November, 2010: Initial post

I hope to update this when Microsoft will release the official version of the ListPicker control.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Israel Israel
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 5 Pin
FruityMo11-Jan-12 23:13
memberFruityMo11-Jan-12 23:13 
GeneralGood start but ... PinPopular
Richard MacCutchan22-Nov-10 3:31
protectorRichard MacCutchan22-Nov-10 3:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190419.4 | Last Updated 22 Nov 2010
Article Copyright 2010 by ykpui
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid