Skip to content

Latest commit

 

History

History
29 lines (18 loc) · 2.1 KB

File metadata and controls

29 lines (18 loc) · 2.1 KB
description Learn how to launch Windows Settings directly to the camera settings page.
title Launch the camera settings page
ms.date 11/26/2024
ms.topic article
keywords windows 10, winui 3
dev_langs
csharp
ms.localizationpriority medium

Launch the camera settings page

Windows defines a set of URIs that allow apps to launch Windows Settings and display a particular settings page. This article explains how to launch Windows Settings directly to the camera settings page and, optionally, navigate directly to the settings for a particular camera on the device. For more information, see Launch Windows Settings.

The camera settings URL

Starting with Windows 11, Build 22000, the URI ms-settings:camera launches Windows Settings and navigates to the camera settings page. Note that in previous versions of Windows, this same URI would launch the default camera application. In addition to the general camera settings page, you can append the query string parameter cameraId set to the symbolic link name, in escaped URI format, to launch directly to the settings page for the associated camera.

In the following example, the DeviceInformation class is used to retrieve the symbolic link name for the first video capture device on the current machine, if one exists. Next, LaunchUriAsync is called to launch Windows Settings. The ms-settings:camera Uri specifies that the camera settings page should be shown. The optional query string parameter cameraId is set to the symbolic link name for the camera, escaped with a call to Url.EscapeDataString, to specify that the settings for the associated camera should be shown.

:::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml.cs" id="SnippetLaunchCameraSettings":::

Related topics