You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -21,25 +21,35 @@ Create a new instance of **CameraCaptureUI**, passing in the [AppWindow.Id](/win
21
21
22
22
Call [CaptureFileAsync](/windows/windows-app-sdk/api/winrt/microsoft.windows.media.capture.cameracaptureui.capturefileasync) to launch the camera capture UI asynchronously. Use one of the values from the [CameraCaptureUIMode](/windows/windows-app-sdk/api/winrt/microsoft.windows.media.capture.cameracaptureuimode) to specify whether the UI should allow photo capture, video capture, or both. When **CaptureFileAsync** completes, it will return a [StorageFile](/uwp/api/windows.storage.storagefile) file object containing the captured photo or video. If the returned object is null it means that either the user cancelled the capture operation or an error occurred.
23
23
24
+
The following example demonstrates launching the **CameraCaptureUI** for photo capture specifying the image format as PNG and disabling cropping. In this example the captured photo is set as the source for an [Image](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.image) control.
The following example demonstrates launching the **CameraCaptureUI** for video capture specifying the maximum resolution as standard definition and disabling trimming. In this example the captured photo is set as the source for an [MediaPlayerElement](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediaplayerelement) control.
92
+
93
+
### [C#](#tab/csharp)
94
+
95
+
```csharp
96
+
var cameraCaptureUI = new CameraCaptureUI(this.AppWindow.Id);
The **CameraCaptureUI** creates randomized names for captured media files, so you may want to rename and move captured files to keep them organized. THe following example moves and renames a captured file.
0 commit comments