Workaround for ListPicker missing writable ItemCountThreshold

The ListPicker in Wp7 Toolkit allowed you to specify how many items could be shown before it went into full-screen mode. Quite correctly that has been removed and is now hardcoded to 5. Well, rules are there to be broken, and if you *really* need to workaround the problem then you can try the following (it works at the moment, may not work in the future)

Type type = MyListPicker.GetType();
PropertyInfo itemCountThreshold = type.GetProperty("ItemCountThreshold");
itemCountThreshold.SetValue(MyListPicker, 20);

Looking at the reflection code I released that I hadn’t actually done anything sneaky. So I replaced it with the following…more graceful code;

MyListPicker.SetValue(Microsoft.Phone.Controls.ListPicker.ItemCountThresholdProperty, 20);