0
votes

I use a Listpicker in a Listbox inside a ScrollViewer. If the number of items in the Listpicker is 3 (or less than 3), the Listpicker opens as a ComboBox in the current page. But if the number of items is more than 3, it opens in another page, not as a ComboBox. How can I solve this problem?

4

4 Answers

1
votes

You can set number of items that as displayed on an other page by setting ItemCountThreshold property of ListPicker. Eg. setting ItemCountThreshold=3 will force ListPicker to show items on new page when there are more then 3 items available to select.

More info about ListPicker properties can be fount eg. here: ListPicker for WP7 in depth

0
votes

ListPicker is a new control in the Silverlight Toolkit for Windows Phone. It is for user's to choose another item like Combobox but ListPicker has more features than a Combobox. When you have little item about 1->4 it'll show data as a Combobox and if more item Listpicker will show data as a ListBox.

Refer this Link to get perfect idea.

0
votes

Read this article and certainly pay attention to the "ItemCountThreshold" property.

ItemCountThreshold is a dependency property of type int. It specifies the maximum number of items that will be displayed in Expanded mode. By default, lists with five or fewer items expand in-place while lists with more items switch to a full-screen selection interface. It can also be set to 0 to switch Full mode or a very large number to switch Expanded mode.

0
votes

While the toolkit team advised to adhere to the restriction, there are workarounds for this issue. A value can be set via code and also via a binding.

<toolkit:ListPicker ItemCountThreshold="{Binding Hugo,FallbackValue=10}">(...)
<!-- Hugo is a bogus binding that does not really exist -->

See my detailed answer to a related question.