There has been a long standing 'feature' in the excellent Silverlight Control Toolkit when the list picker is the last item on a screen, the dropdown is not shown. If we look at the screenshot, we can see the list picker has been clicked, as an item is highlighted, but we only see one item.
The XAML for this list picker is:
<toolkit:ListPicker
Margin="0"
ItemsSource="{Binding MissionLength}"
ItemTemplate="{StaticResource DistanceUnitsTemplate}"
SelectedIndex="{Binding
GameLength,
Mode=TwoWay}"/>
</StackPanel>
The easy way around this is to add a ‘dummy’ textblock after the list picker, so that it can drop down correctly. The modified XAML is:
<toolkit:ListPicker
Margin="0"
ItemsSource="{Binding MissionLength}"
ItemTemplate="{StaticResource DistanceUnitsTemplate}"
SelectedIndex="{Binding
GameLength,
Mode=TwoWay}"/>
<TextBlock Margin="0,24,0,0"
Text=" "
Style="{StaticResource PhoneTextNormalStyle}" />
</StackPanel>
The results of adding the textblock are now:
All it takes is a little bit of ingenuity.
Originally posted 9/Jun/2012