Skip to content

Posts tagged ‘controls’

14
Dec

Getting Around Pivot Control SelectedIndex Bug

For those of you not aware, there’s a bug in the WP7 Pivot control. It crashes if you try and set the SelectedIndex to 2. Hopefully, you’ve encountered this during testing and found this trying to solve it. Hopefully it’ll just be fixed in a future update, but that doesn’t help now.

I tried a few things, but for Suitor 2 landed on the following solution as the simplest. The only impact it has is that your first Pivot page will display briefly before it pans to the one you desired to set programmatically. All you need to do is rig up the “Loaded” event on your Pivot control. Then you can dispatch the call to change the index, like so:

Read moreRead more