This question is locked. New answers and comments are not allowed.
This issue is very strange indeed. I can't seem to replicate it in a sample project to send your way either, but maybe someone else has seen something similar before.
I have a page with several list pickers, text boxes and static data sources. I'm just setting listpicker.ItemsSource in the code behind. When I set the ItemsSource to a collection with 5 or less items, nothing appears. When I set it to 6 or more, it works.
Here's my XAML:
<Controls:RadListPicker x:Name="lstMonthlyX"> <Controls:RadListPicker.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding Key}"/> </DataTemplate> </Controls:RadListPicker.ItemTemplate></Controls:RadListPicker>Here's my class I'm binding (Maybe I don't need this, but the KeyValuePair struct wasn't working either):
public class KVP<K, V>{ public KVP(K pKey, V pValue) { Key = pKey; Value = pValue; } public K Key { get; set; } public V Value { get; set; }}Here's a collection that works:
List<KVP<string, byte>> retVal = new List<KVP<string, byte>>();retVal.Add(new KVP<string, byte>("day", 8));retVal.Add(new KVP<string, byte>("weekday", 9));retVal.Add(new KVP<string, byte>("weekend day", 10));retVal.Add(new KVP<string, byte>("Sunday", 1));retVal.Add(new KVP<string, byte>("Monday", 2));retVal.Add(new KVP<string, byte>("Tuesday", 3));retVal.Add(new KVP<string, byte>("Wednesday", 4));retVal.Add(new KVP<string, byte>("Thursday", 5));retVal.Add(new KVP<string, byte>("Friday", 6));retVal.Add(new KVP<string, byte>("Saturday", 7));And here's one that doesn't work:
List<KVP<string, byte>> retVal = new List<KVP<string, byte>>(5);retVal.Add(new KVP<string, byte>("1st", 1));retVal.Add(new KVP<string, byte>("2nd", 2));retVal.Add(new KVP<string, byte>("3rd", 3));retVal.Add(new KVP<string, byte>("4th", 4));retVal.Add(new KVP<string, byte>("last", 5));Any input is appreciated. Thanks!