What I Learned In WP7 – Issue 14

by Jeff Blankenburg 7. January 2011 08:57

I’ve been working on some dynamic Panorama designs, but there were a couple of things I was finding tricky:

1) Loading a Panorama control at a specific position. (also just navigating to a different place in one.)

2) Preventing a Panorama from wrapping around from the last to the first element.

In the first case, I just wasn’t looking in the right place.  To change which panel of a Panorama you are viewing, you can use:

Panorama.DefaultItem = Panorama.Items[index];

For the second case, you might be asking WHY I would want to prevent the Panorama from wrapping around, which is the default behavior.  In my application, when you first come to the Panorama control, you only have ONE PanoramaItem.  So scrolling is more confusing than anything else.  As you continue to enter data into the app, however, the Panorama can grow to as many as 10 Panorama items.

The short story on this, however, is that it’s not really possible.  If you need to change the Panorama’s behavior that drastically, you might want to look at using a different control.

Tags:

windows phone

Comments

1/7/2025 12:27:28 PM #

Blankenblog | What I Learned In WP7 – Issue 14

Blankenblog | What I Learned In WP7 – Issue 14

http://links.ginktage.com | Reply

1/7/2025 5:18:29 PM #

I was just curious how you came up with the Panorama being limited to 10 items.  The article 'Understanding Windows Phone 7 Panorama Control' states you can add as many items as you want.  Now, I understand that too many would simply overload the app, but is 10 a rule of thumb we should be using?  I currently have an app that uses 14 which seems to function just fine.

Jeff Williams | Reply

1/7/2025 5:53:26 PM #

Jeff,

I was actually referring to MY application in that example.  There's not a specific limit, though I have heard recommendations to not go over seven.  (I built one with the alphabet...that's 26!)

jeffblankenburg | Reply

1/7/2025 6:08:29 PM #

Good to know.  Thank You!

Jeff Williams | Reply

1/10/2025 5:27:25 PM #

In my experience setting the DefaultItem totally changes the Panorama layout. It doesn't reposition the Panorama, but it alters it, so that the DefaultItem becomes the first PanoramaItem in the Panorama. And that is often not the thing you want.

Leon Zandman | Reply

3/15/2011 2:04:28 AM #

I agree: quite a few places mention this "workaround" to set the selected item, however none mention that the layout changes, which can be VERY confusing for the user.

Adrian Hara | Reply

1/14/2011 3:03:10 AM #

Pingback from topsy.com

Twitter Trackbacks for
        
        Blankenblog | What I Learned In WP7 – Issue 14
        [jeffblankenburg.com]
        on Topsy.com

topsy.com | Reply

Add comment


(Will show your Gravatar icon)

 

biuquote
  • Comment
  • Preview



My Sponsor

Popular Series

31 Days of Windows Phone 7

31 Days of Silverlight

28 Days of Did-You-Know (Diduary)

Windows Phone 7 Developer Resources

Windows Phone 7 User Resources

Calendar

<<  March 2011  >>
MoTuWeThFrSaSu
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar