XAML:
<toolkit:ListPicker x:Name="payerMenu" Height="588" HorizontalAlignment="Left" Margin="34,11,0,0" VerticalAlignment="Top" Width="234" ExpansionMode="ExpansionAllowed"></toolkit:ListPicker>
Code behind:
private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
{
payerMenu.ItemsSource = App.Instance.namesList;
}
namesList is a List<string>. Items are added to that list from another page. When I return to the main page, there are no items shown in the ListPicker. However, I manually print the contents of the ListPicker items in a textblock, all the items are printed
private void button1_Click(object sender, RoutedEventArgs e)
{
foreach(var item in payerMenu.Items)
{
textBlock1.Text += item.ToString();
}
}
This means there items "are" in the ListPicker, for some reason it not showing. I tried hardcoding few items to start with, those items come up in the ListPicker, but not the user added ones.