I have a project that requires binding a list of strings to a listpicker control. When the binding is done (either in Loaded or OnNavigatedTo events), the listpicker opens to show the bound items, but some items are randomly missing (in fullscreen mode). When the listpicker starts closing, the missing items seem to appear.
Issue posted on stackoverflow: http://stackoverflow.com/questions/10187829/wp7-listpicker-not-showing-all-items
I have also attached a sample project. Please check it out.
Comments: ** Comment from web user: wieser_software **
Issue posted on stackoverflow: http://stackoverflow.com/questions/10187829/wp7-listpicker-not-showing-all-items
I have also attached a sample project. Please check it out.
Comments: ** Comment from web user: wieser_software **
Thanks for the fix @shawnoster
I've tested it here, and the problem goes away. It's a much better version than the original in that it now only sets the rotation to -90 on visible items in the first place, and doesn't waste time setting up invisible items.
I am concerned though that when you get to the OnLoaded handler, are you guaranteed that
IList<WeakReference> itemsInView = ItemsControlExtensions.GetItemsInViewPort(Picker);
will get the visible items? I'm concerned that it might return fewer than there actually are.
Also, the IsOpen backing dependency property appears to have a typo (actually a paste into the middle):
isOIsOpenpen