Example #1
0
 private async void btnTakePhoto_Click(object sender, RoutedEventArgs e)
 {
     // takePhoto();
     PhotoTaker phTaker = new PhotoTaker();
     Task<ReturnElements> task = phTaker.takePhoto(parentImage.Width, parentImage.Height);
     ReturnElements returnEle = await task;
     Image image = new Image();
     image.Source = returnEle.bitmapImage;
     parentImage.Source = returnEle.bitmapImage;
     txbName.Text = returnEle.filename;            
 }
Example #2
0
        public async void TakePhoto()
        {
            ColorList.Visibility = Visibility.Collapsed;
            MailGrid.Visibility = Visibility.Collapsed;
            PictureView.Visibility = Visibility.Collapsed;
            QuestionGrid.Visibility = Visibility.Collapsed;

            PhotoTaker phototaker = new PhotoTaker();
            PhotoTaker phTaker = new PhotoTaker();
            Task<ReturnElements> task = phTaker.takePhoto(factory.ScreenWidth, factory.ScreenHeight);
            ReturnElements returnEle = await task;
            Image image = new Image();
            image.Source = returnEle.bitmapImage;
            image.Stretch = Stretch.Fill;
            Painter.Children.Add(image);
        }