Marius Bughiu
Marius Bughiu

Reputation: 1017

Can you make a pivot scroll like a panorama?

Is it possible to achieve a panorama-like scrolling effect in the pivot? I mean instead of flying items in, scroll them in. Like when you use the panorama control and drag the item in view you can already see the next and previous items, but in the pivot you don't - the current item flies out and the next / prev one flies in.

Why am I trying to do this?

Well, as you probably know you can not programatically set the SelectedIndex on a panorama because Microsoft decided to make that property read-only. I have tried several things to fix that including extending the control and using behaviors - but I didn't succeed so I gave up.

Finally I gave up an chose to use the Pivot control instead and it works just fine, except for the scrolling part, where I'd like to have the scrolling effect from the panorama.

Why am I trying to achieve?

A current page overlay. You know, like in the Android applications screen where you can swipe trough a couple of pages and you can see at the bottom / top of your screen on which page you are on (this is the easy part) and also, when you click on one of those bubbles it scrolls to the corresponding page (that's the hard part - because you can't set the SelectedIndex on the Panorama control).

So, any ideas on how to achieve that scrolling effect in the Pivot control? or maybe got another idea on how to change the SelectedIndex on the Panorama? (changing DefaultItem is not a solution).

Thanks.

Upvotes: 2

Views: 585

Answers (1)

Emond
Emond

Reputation: 50672

This sounds way off from the regular behavior of the Panorama/Pivot control so you might want to have a look at the source code and adapt it: http://phone.codeplex.com/

EDIT

In changeset 80787 the panorama control and the pivot control were removed. So to get the code you need to go back to a changeset from before Oct 29 2012.

Upvotes: 2

Related Questions