示例#1
0
        void photoChooseTask_Completed(object sender, PhotoResult e)
        {
            var capturedPicture = new CapturedPictureViewModel(e.OriginalFileName, e.ChosenPhoto);

            //set mode for camera
            TransientState.Set("CapturedPictureViewModel", capturedPicture);
        }
示例#2
0
 private void cameraTask_Completed(object sender, PhotoResult e)
 {
     if (e.TaskResult == TaskResult.OK)
     {
         // Get the image temp file from e.OriginalFileName.
         // Get the image temp stream from e.ChosenPhoto.
         // Don't keep either the temp stream or file name.
         var capturedPicture = new CapturedPictureViewModel(e.OriginalFileName, e.ChosenPhoto);
         //set mode for camera
         TransientState.Set("CapturedPictureViewModel", capturedPicture);
     }
 }
示例#3
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            var capturedPicture = TransientState.Get <CapturedPictureViewModel>("CapturedPictureViewModel");

            if (capturedPicture != null)
            {
                TransientState.Set <CapturedPictureViewModel>(CapturePicturePage.ModelStateKey, capturedPicture);
                //NavigationService.Navigate<CapturePicturePage>();
                this.NavigationService.Navigate(new Uri("/Views/Capture/CapturePicturePage.xaml", UriKind.Relative));
            }

            base.OnNavigatedTo(e);
        }