title: windows phone 8.1 RT Zxing.net implementation : issue with CapturePhotoToStreamAsync
body: <p>I'm using ZXing.net to create a UserControl for scanning barcode into a Windows Phone 8.1 RT app using the camera.</p>
  
  <p>The barcode are decoded well but i'm having freezes on the UI when the method CapturePhotoToStreamAsync is called, even it is awaited.
  It takes about 600 ms to execute.</p>
  
  <p>I'm testing the app into the emulator.</p>
  
  <p>The code below is executed in an async method :</p>
  
  <pre><code>// Preview of the camera    
  await _mediaCapture.InitializeAsync(settings);
  VideoCapture.Source = _mediaCapture;
  VideoCapture.FlowDirection = Windows.UI.Xaml.FlowDirection.LeftToRight;
  await _mediaCapture.StartPreviewAsync();
  
  VideoEncodingProperties res = _mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview) as VideoEncodingProperties;
  ImageEncodingProperties iep = ImageEncodingProperties.CreateBmp();
  
  iep.Height = res.Height;
  iep.Width = res.Width;
  
  var barcodeReader = new BarcodeReader
  {
       TryHarder = true,
       AutoRotate = true
  };
  
  WriteableBitmap wB = new WriteableBitmap((int)res.Width, (int)res.Height);
  while (_result == null)
  {
       using (var stream = new InMemoryRandomAccessStream())
       {
          await _mediaCapture.CapturePhotoToStreamAsync(iep, stream);
  
          stream.Seek(0);
          await wB.SetSourceAsync(stream);
  
          _result = barcodeReader.Decode(wB);
        }
   }
  
   await _mediaCapture.StopPreviewAsync();
   //callback to handle result
   ScanCallback(_result.Text);
  </code></pre>
  
  <p>What can I do to prevent the UI from freezing ?</p>