SwapNeil
SwapNeil

Reputation: 555

How to add camera functionality in windows app using Project Reunion template for WinUI 3.0 desktop app?

I'm developing a desktop application using Project Reunion WinUI template in Visual Studio 2019. We have requirement that we need to capture image from our application and save it.

I tried CameraCaptureUI (this works in UWP application, but not in Project Reunion)

Code:

CameraCaptureUI dialog = new CameraCaptureUI();
Size aspectRatio = new Size(16, 9);
dialog.PhotoSettings.CroppedAspectRatio = aspectRatio;
StorageFile file = await dialog.CaptureFileAsync(CameraCaptureUIMode.Photo);
if (file == null)
{
}

Error:

Error

We tried using CaptureElement Reference, but it is not supported in Project Reunion.

Let me know what I'm missing something here.

Thanks in advance.

Upvotes: 1

Views: 847

Answers (1)

rmbl
rmbl

Reputation: 39

Currently not available in WinUI3 (Reunion).

https://github.com/microsoft/microsoft-ui-xaml/issues/4710

Upvotes: 0

Related Questions