protected override void OnNavigatedFrom(NavigationEventArgs args) { appService.State["colorBits"] = bitSelectDialog.ColorBits; if (jpegBits != null) { appService.State["jpegBits"] = jpegBits; } if (args.Content is SaveFileDialog) { SaveFileDialog page = args.Content as SaveFileDialog; page.SetTitle(ApplicationTitle.Text); } base.OnNavigatedFrom(args); }
protected override void OnNavigatedFrom(NavigationEventArgs args) { if (writeableBitmap != null) { MemoryStream stream = new MemoryStream(); writeableBitmap.SaveJpeg(stream, writeableBitmap.PixelWidth, writeableBitmap.PixelHeight, 0, 75); appService.State["jpegBits"] = stream.GetBuffer(); } if (args.Content is SaveFileDialog) { SaveFileDialog page = args.Content as SaveFileDialog; page.SetTitle(ApplicationTitle.Text); } base.OnNavigatedFrom(args); }