windows-phone-8windows-phonelistpicker

Why ListPicker always showing in FullscreenOnly mode


I am using a ListPicker and it is always showing in FullscreenOnly mode even if i change the ExpansionMode to ExpansionAllowed.

But in other page the same code is working properly.

Why is this strange behaviour happening?


Solution

  • (Assuming this is the Windows Phone Toolkit ListPicker)

    If your list is longer than 5 items then it will open in FullScreenMode. It isn't possible to change this threshold value.

    So, this one will expand:

    <toolkit:ListPicker Header="Background">
        <sys:String>dark</sys:String>
        <sys:String>light</sys:String>
        <sys:String>dazzle</sys:String>
        <sys:String>4</sys:String>
        <sys:String>5</sys:String>
    </toolkit:ListPicker>
    

    This one will always be full screen:

    <toolkit:ListPicker Header="Background">
        <sys:String>dark</sys:String>
        <sys:String>light</sys:String>
        <sys:String>dazzle</sys:String>
        <sys:String>4</sys:String>
        <sys:String>5</sys:String>
        <sys:String>6</sys:String>
    </toolkit:ListPicker>