private async void GenerateImage() { if (Busy) { return; } Busy = true; SpriteControl.DismissActiveSprite(); AppBarNormal(); HideContextMenu(); //http://social.technet.microsoft.com/wiki/contents/articles/20648.using-the-rendertargetbitmap-in-windows-store-apps-with-xaml-and-c.aspx RectangleGeometry cropArea = new RectangleGeometry() { Rect = new Rect(0d, 0d, stagePanel.ActualWidth, stagePanel.ActualHeight) }; /* IMPORTANT: in order to get the expected result, the clipped element and the captured element should NOT be the same one */ stagePanelForClipping.Clip = cropArea; //string fileName = "MeiTuTieTie_" + DateTime.Now.ToString("yyyy_MM_dd_hh_mm_ss") + ".jpg"; //ImageHelper.CaptureToMediaLibrary(this.stagePanel, fileName, exportWidth); var bitmap = await ImageHelper.Capture(this.stagePanel, exportWidth); Frame.Navigate(typeof(ExportPage), bitmap); Busy = false; }
private void PickPhoto_Click(object sender, RoutedEventArgs e) { SpriteControl.DismissActiveSprite(); PickPhotos(); HideContextMenu(); }
private void stageBackground_PointerPressed(object sender, PointerRoutedEventArgs e) { SpriteControl.DismissActiveSprite(); AppBarNormal(); HideContextMenu(); }