Pivot Load Events
Pivot
raises various events to indicate when a PivotItem
is being brought into view and when it is being moved out of view.
Best Practice
To improve the performance of your app, use the LoadingPivotItem
event to load content on demand. One approach is to convert the content of each PivotItem
into a UserControl
. You can then subscribe to the LoadingPivotItem
event on the Pivot
, and then when the event is raised instantiate the UserControl
and set it as the PivotItem
’s content.
The UnloadedPivotItem
event also provides the opportunity to clean up any unneeded resources.
When the user switches from one PivotItem
to another, events are raised in the following order:
1. The UnloadingPivotItem
event is raised for the first PivotItem ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.