MicrosoftDocs / winrt-api

WinRT reference content for developing Microsoft Universal Windows Platform (UWP) apps
Creative Commons Attribution 4.0 International
230 stars 494 forks source link

CameraCaptureUI with AllowCropping does not show Cropping Window and stucked on Capture windows. #2469

Open ThinhDb opened 4 months ago

ThinhDb commented 4 months ago

When I call the following code with AllowCropping set to true:

var dialog = new CameraCaptureUI();
dialog.PhotoSettings.MaxResolution = CameraCaptureUIMaxPhotoResolution.HighestAvailable;
dialog.PhotoSettings.AllowCropping = true;
dialog.PhotoSettings.Format = CameraCaptureUIPhotoFormat.Jpeg;

var file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo);

The camera window shows up, but after clicking on the take photo button, nothing happens, and the code is still stuck waiting for CaptureFileAsync() until I manually close the Capture windows.

Expected:

Cropping windows shows after I clicked on Take Photo button and allow me to Save the image

Actual:

Nothing happens after clicked on Take Photo button.