protected override void OnNavigatedTo(NavigationEventArgs e) { // Restore GRID STATE and SIZE if (ApplicationData.Current.LocalSettings.Values.ContainsKey("json")) { string json = ApplicationData.Current.LocalSettings.Values["json"] as string; model = JsonConvert.DeserializeObject <LightsOutModel.LightsOutGame>(json); } }
public MainPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Enabled; ApplicationView.PreferredLaunchViewSize = new Size(500, 600); ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize; model = new LightsOutModel.LightsOutGame(); CreateGrid(); DrawGrid(); }