Hi,

Probably all of us used Pivot control from WP7 SDK.  By default it preloads the pivotItem we see, and 2 additional items: to the left and to the right.

 

Sometimes it is useful not to do that preloading if you want to show first pivotItem ASAP.

This can be easily done by deriving from SDKs Pivot control and overriding OnLoadedPivotItem method.
Currently it looks like that:

image

 

When some pivotItem is loaded it checks whether its neighbours were already loaded. If not – it preloads them.

I created a derived class that overrides that method and does nothing.
WARNING: We will lose LoadedPivotItem event.

image

 

Other pivot will load first time user navigates to them.

Advertisements

3 thoughts on “Preventing preload of pivotItems in Pivot control on Windows Phone 7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s