Tools

Namespaces

Variants

Views

Actions

Search

Contents

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Contents

Problem

Sometimes in an app there's a requirement to place many UI controls on the screen like textbox, button, textblock etc. one after other or otherwise and it gives a bad user experience if those controls do not work as expected when user clicks/taps on it and ListPicker control is no different.

Try placing various UI controls along with ListPicker at the bottom with ScrollViewer encapsulating the screen, you will notice that only an item or two are visible to the user when ListPicker is tapped and rest of the items are hidden below the screen i.e. as expected ListPicker does not 'shifts-up' the UI controls above it to show all the items it contain.

Refer these pictures to have a better understanding :

ListPicker at the bottom

ListPicker tapped

Solution

To quickly summarize as what is depicted in this code blog is the need to make the ListPicker control visible all the time inside the ScrollViewer and to do so, some extension methods are written.
Its a well explained blog so it won't be fair to copy here the same piece of code, instead attaching a running example project as how to actually use the code in the app would be useful.

EndResult

The ListPicker control behaves in the way it should be, displaying all the contained items by properly shifting the other controls.