locked
Can I trigger the various camera options in a CameraCaptureUI dialog in my Windows Store App?

    Question

  • I am using the CameraCaptureUI dialog to capture images and video from the camera in my Windows Store App.  I am using an alternative input device, so I want to trigger the various operations in the CameraCaptureUI dialog from my own C# code, instead of having the user click the mouse or use touch to trigger them.  Right now the CameraCaptureUI dialog appears to be a "black box" and I can't see any entry or intercept points.  Is there a way to trigger the various CameraCaptureUI dialog operations (take picture, start video record, stop video record, etc.) from my C# code?

    If not, is there a more direct WinRT interface to the camera I can use to to do this myself and if so, what is it called so I can research it?

    -- roschler

    Saturday, June 7, 2014 3:32 AM

All replies

  • You can use MediaCapture API to provide a custom way to record video, take photo etc. Check out the sample here: Media capture using capture device sample.

    - Ram
    If a post answers your question, please click "Mark As Answer" on that post and "Mark as Helpful".

    Saturday, June 7, 2014 3:46 AM
  • Thanks.  Would you happen to know how different that API is from the Windows Phone equivalent?  I"m asking because I have already written code to do camera capture and video recording on Windows Phone 8, and I'm wondering if I should even try to convert it, or just write new code using the MediaCapture API you just referred me to.

    -- roschler

    Saturday, June 7, 2014 3:51 AM
  • The API are fairly different though for basic usage neither are terribly difficult.

    --Rob

    Monday, June 9, 2014 2:35 AM
    Owner