Q:

I use the following code to capture image from camera. But I cant record the video by this

CameraCaptureUI capture = new CameraCaptureUI();

capture.PhotoSettings.Format = CameraCaptureUIPhotoFormat.Jpeg;

capture.PhotoSettings.CroppedAspectRatio = new Size(1, 2);

capture.PhotoSettings.MaxResolution=CameraCaptureUIMaxPhotoResolution.HighestAvailable

StorageFile storeFile=await capture.CaptureFileAsync(CameraCaptureUIMode.Photo);

if (storeFile != null)
{
    var stream = await storeFile.OpenAsync(FileAccessMode.Read);

    BitmapImage bimage = new BitmapImage();

    bimage.SetSource(stream);

    Image imageitem = new Image();

    imageitem.Source = bimage;

    my_canvas.Children.Add(imageitem);

A:

Just use standard sample for recording video from Capture photos and video with CameraCaptureUI
CameraCaptureUI captureUI = new CameraCaptureUI();
captureUI.VideoSettings.Format = CameraCaptureUIVideoFormat.Mp4;

StorageFile videoFile = await captureUI.CaptureFileAsync(CameraCaptureUIMode.Video);

if (videoFile == null)
{
// User cancelled photo capture
return;
}

