window phone

Fix Window Phone LongListSelector dynamic binding exception

Sometime, you are receive an exception error when using Window Phone Toolkit LongListSelector control. It occur while you are trying to modify ItemsSource which is ObservableCollection (or any implement INotifyCollectionChanged interface) of the LongListSelector control.

The error message can form: ArgumentOutOfRangeException is being thrown within InsertNewGroups in LongListSelector.cs
And the part of stack trace could be:

Slide to next panorama item programmatically (set panorama SelectedIndex)

In window phone development (this post focus on Window Phone 7), there is a big problem that Microsoft doesn't allow me to change the SelectedIndex property of Panorama and control it programatically. Therefore, what will we do if we need to slide a panorama item to the next item or previous item. In the best way, re-develop a new panorama control as same as panorama control of Microsoft will allow you to custom anything you like in your control. However, in this section, we discuss about how to slide the Microsoft's panorama control.