public MainPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Enabled; game = new LightsOutGame(); CreateGrid(); DrawGrid(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (ApplicationData.Current.LocalSettings.Values.ContainsKey("grid")) { string json = ApplicationData.Current.LocalSettings.Values["grid"] as string; game = JsonConvert.DeserializeObject <LightsOutGame>(json); DrawGrid(); } }