|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using System.Windows.Navigation;
using MyLastFm.ViewModel;
using MyLastFm.Model;
namespace MyLastFm
{
/// <summary>
/// Description for CalendarPage.
/// </summary>
public partial class CalendarPage : LastFmPage
{
/// <summary>
/// Initializes a new instance of the CalendarPage class.
/// </summary>
public CalendarPage()
{
InitializeComponent();
AnimationContext = ContentGrid;
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
// If the constructor has been called AND the PreservingPageState key is in the State dictionary,
// then the UI state for this page should be restored
if (IsResurrectedPage)
{
State.RestoreState(Pivoter);
State.RestoreState(RecommendedEventsScrollViewer);
State.RestoreState(CalendarEventsScrollViewer);
State.RestoreState(NearbyEventsScrollViewer);
}
}
protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedFrom(e);
State.PreserveState(Pivoter);
State.PreserveState(RecommendedEventsScrollViewer);
State.PreserveState(CalendarEventsScrollViewer);
State.PreserveState(NearbyEventsScrollViewer);
}
private void ApplicationBar_Click(object sender, EventArgs e)
{
AppBarButtonPressed(((IApplicationBarMenuItem)sender).Text);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
The first computer program I ever wrote was in BASIC on a TRS-80 Model I and it looked something like:
10 PRINT "Don is cool"
20 GOTO 10
It only went downhill from there.
Hey look, I've got a blog