title: How to take a picture in Xamarin?
body: <p>I am trying to take a picture using Camera class from Android.Hardware. I am getting the feed and the camera is getting auto-foucs. The problem is that I do not know how to take the photo.</p>
  
  <pre><code>_camera = Camera.Open();
  Camera.Parameters param = _camera.GetParameters();
  param.FocusMode = Camera.Parameters.FocusModeContinuousPicture;
  _camera.SetParameters(param);
  
  
  var previewSize = _camera.GetParameters().PreviewSize;
  _textureView.LayoutParameters =
      new FrameLayout.LayoutParams(previewSize.Width,
          previewSize.Height, GravityFlags.Center);
  
  try
  {
      _camera.SetPreviewTexture(surface);
      _camera.StartPreview();
  }
  catch (Java.IO.IOException ex)
  {
      System.Console.WriteLine(ex.Message);
  }
  
  // this is the sort of thing TextureView enables
  _textureView.Rotation = 90.0f;
  </code></pre>