diff --git a/hub/apps/develop/camera/basic-photo-capture.md b/hub/apps/develop/camera/basic-photo-capture.md index 72abb52745..61786f139a 100644 --- a/hub/apps/develop/camera/basic-photo-capture.md +++ b/hub/apps/develop/camera/basic-photo-capture.md @@ -23,7 +23,7 @@ The [**SoftwareBitmap**](/uwp/api/Windows.Graphics.Imaging.SoftwareBitmap) class Capture a photo to a **SoftwareBitmap** using the [**LowLagPhotoCapture**](/uwp/api/Windows.Media.Capture.LowLagPhotoCapture) class. Get an instance of this class by calling [**PrepareLowLagPhotoCaptureAsync**](/uwp/api/windows.media.capture.mediacapture.preparelowlagphotocaptureasync), passing in an [**ImageEncodingProperties**](/uwp/api/Windows.Media.MediaProperties.ImageEncodingProperties) object specifying the image format you want. [**CreateUncompressed**](/uwp/api/windows.media.mediaproperties.imageencodingproperties.createuncompressed) creates an uncompressed encoding with the specified pixel format. Initiate photo capture by calling [**CaptureAsync**](/uwp/api/windows.media.capture.lowlagphotocapture.captureasync), which returns a [**CapturedPhoto**](/uwp/api/Windows.Media.Capture.CapturedPhoto) object. Get a **SoftwareBitmap** by accessing the [**Frame**](/uwp/api/windows.media.capture.capturedphoto.frame) property and then the [**SoftwareBitmap**](/uwp/api/windows.media.capture.capturedframe.softwarebitmap) property. -You can capture multiple photos by repeatedly calling **CaptureAsync**. When you are done capturing, call [**FinishAsync**](/uwp/api/windows.media.capture.advancedphotocapture.finishasync) to shut down the **LowLagPhotoCapture** session and free up the associated resources. After calling **FinishAsync**, to begin capturing photos again you will need to call [**PrepareLowLagPhotoCaptureAsync**](/uwp/api/windows.media.capture.mediacapture.preparelowlagphotocaptureasync) again to reinitialize the capture session before calling [**CaptureAsync**](/uwp/api/windows.media.capture.lowlagphotocapture.captureasync). +You can capture multiple photos by repeatedly calling **CaptureAsync**. When you are done capturing, call [**FinishAsync**](/uwp/api/windows.media.capture.lowlagphotocapture.finishasync) to shut down the **LowLagPhotoCapture** session and free up the associated resources. After calling **FinishAsync**, to begin capturing photos again you will need to call [**PrepareLowLagPhotoCaptureAsync**](/uwp/api/windows.media.capture.mediacapture.preparelowlagphotocaptureasync) again to reinitialize the capture session before calling [**CaptureAsync**](/uwp/api/windows.media.capture.lowlagphotocapture.captureasync). :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml.cs" id="SnippetCameraLowLagPhotoCapture"::: @@ -94,7 +94,7 @@ You can quickly add audio capture to your app by using the same technique shown :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml.cs" id="SnippetCameraStartAudioCapture"::: -Call [**StopAsync**](/uwp/api/windows.media.capture.lowlagphotosequencecapture.stopasync) to stop the audio recording. +Call [**StopAsync**](/uwp/api/windows.media.capture.lowlagmediarecording.stopasync) to stop the audio recording. :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml.cs" id="SnippetCameraStopAudioCapture"::: diff --git a/hub/apps/develop/camera/capture-device-controls-for-photo-and-video-capture.md b/hub/apps/develop/camera/capture-device-controls-for-photo-and-video-capture.md index ea5576ec6c..d603785a80 100644 --- a/hub/apps/develop/camera/capture-device-controls-for-photo-and-video-capture.md +++ b/hub/apps/develop/camera/capture-device-controls-for-photo-and-video-capture.md @@ -51,7 +51,7 @@ This example uses a [**Slider**](/uwp/api/Windows.UI.Xaml.Controls.Slider) contr :::code language="xml" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml" id="SnippetEvXAML"::: -Check to see if the current capture device supports the **ExposureCompensationControl** by checking the [Supported](/windows/uwp/audio-video-camera/supported-codecs) property. If the control is supported, you can show and enable the UI for this feature. +Check to see if the current capture device supports the **ExposureCompensationControl** by checking the [Supported](/uwp/api/windows.media.devices.exposurecompensationcontrol.supported) property. If the control is supported, you can show and enable the UI for this feature. The exposure compensation value must be within the range supported by the device and must be an increment of the supported step size. Get the supported values for the current device by checking the [**Min**](/uwp/api/windows.media.devices.exposurecompensationcontrol.min), [**Max**](/uwp/api/windows.media.devices.exposurecompensationcontrol.max), and [**Step**](/uwp/api/windows.media.devices.exposurecompensationcontrol.step) properties, which are used to set the corresponding properties of the slider control. @@ -71,7 +71,7 @@ This example uses a set of radio buttons to allow the user to switch between on, :::code language="xml" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml" id="SnippetFlashXAML"::: -Check to see if the current capture device supports the **FlashControl** by checking the [**Supported**](/uwp/api/windows.media.devices.focuscontrol.supported) property. If the control is supported, you can show and enable the UI for this feature. If the **FlashControl** is supported, automatic red eye reduction may or may not be supported, so check the [**RedEyeReductionSupported**](/uwp/api/windows.media.devices.flashcontrol.redeyereductionsupported) property before enabling the UI. Because the **TorchControl** is separate from the flash control, you must also check its [**Supported**](/uwp/api/windows.media.devices.torchcontrol.supported) property before using it. +Check to see if the current capture device supports the **FlashControl** by checking the [**Supported**](/uwp/api/windows.media.devices.flashcontrol.supported) property. If the control is supported, you can show and enable the UI for this feature. If the **FlashControl** is supported, automatic red eye reduction may or may not be supported, so check the [**RedEyeReductionSupported**](/uwp/api/windows.media.devices.flashcontrol.redeyereductionsupported) property before enabling the UI. Because the **TorchControl** is separate from the flash control, you must also check its [**Supported**](/uwp/api/windows.media.devices.torchcontrol.supported) property before using it. In the [**Checked**](/uwp/api/windows.ui.xaml.controls.primitives.togglebutton.checked) event handler for each of the flash radio buttons, enable or disable the appropriate corresponding flash setting. Note that to set the flash to always be used, you must set the [**Enabled**](/uwp/api/windows.media.devices.flashcontrol.enabled) property to true and the [**Auto**](/uwp/api/windows.media.devices.flashcontrol.auto) property to false. @@ -100,7 +100,7 @@ Enabling continuous autofocus instructs the camera to adjust the focus dynamical :::code language="xml" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml" id="SnippetCAFXAML"::: -Check to see if the current capture device supports the **FocusControl** by checking the [**Supported**](/uwp/api/windows.media.devices.flashcontrol.supported) property. Next, determine if continuous autofocus is supported by checking the [**SupportedFocusModes**](/uwp/api/windows.media.devices.focuscontrol.supportedfocusmodes) list to see if it contains the value [**FocusMode.Continuous**](/uwp/api/Windows.Media.Devices.FocusMode), and if so, show the continuous autofocus radio button. +Check to see if the current capture device supports the **FocusControl** by checking the [**Supported**](/uwp/api/windows.media.devices.focuscontrol.supported) property. Next, determine if continuous autofocus is supported by checking the [**SupportedFocusModes**](/uwp/api/windows.media.devices.focuscontrol.supportedfocusmodes) list to see if it contains the value [**FocusMode.Continuous**](/uwp/api/Windows.Media.Devices.FocusMode), and if so, show the continuous autofocus radio button. :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.ManualControls.xaml.cs" id="SnippetCAF"::: @@ -121,7 +121,7 @@ This example uses a radio button to enable and disable tap-to-focus mode. :::code language="xml" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.xaml" id="SnippetTapFocusXAML"::: -Check to see if the current capture device supports the **FocusControl** by checking the [**Supported**](/uwp/api/windows.media.devices.flashcontrol.supported) property. The **RegionsOfInterestControl** must be supported, and must support at least one region, in order to use this technique. Check the [**AutoFocusSupported**](/uwp/api/windows.media.devices.regionsofinterestcontrol.autofocussupported) and [**MaxRegions**](/uwp/api/windows.media.devices.regionsofinterestcontrol.maxregions) properties to determine whether to show or hide the radio button for tap-to-focus. +Check to see if the current capture device supports the **FocusControl** by checking the [**Supported**](/uwp/api/windows.media.devices.focuscontrol.supported) property. The **RegionsOfInterestControl** must be supported, and must support at least one region, in order to use this technique. Check the [**AutoFocusSupported**](/uwp/api/windows.media.devices.regionsofinterestcontrol.autofocussupported) and [**MaxRegions**](/uwp/api/windows.media.devices.regionsofinterestcontrol.maxregions) properties to determine whether to show or hide the radio button for tap-to-focus. :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.ManualControls.xaml.cs" id="SnippetTapFocus"::: @@ -278,7 +278,7 @@ In the [**SelectionChanged**](/uwp/api/windows.ui.xaml.controls.primitives.selec :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.ManualControls.xaml.cs" id="SnippetWhiteBalanceComboBox"::: -In the **ValueChanged** event handler, get the current value of the control and the set the white balance value by calling [**SetValueAsync**](/uwp/api/windows.media.devices.exposurecontrol.setvalueasync). +In the **ValueChanged** event handler, get the current value of the control and the set the white balance value by calling [**SetValueAsync**](/uwp/api/windows.media.devices.whitebalancecontrol.setvalueasync). :::code language="csharp" source="~/../snippets-windows/winappsdk/audio-video-camera/camera-winui/CS/CameraWinUI/MainWindow.ManualControls.xaml.cs" id="SnippetWhiteBalanceSlider"::: diff --git a/hub/apps/develop/feeds/implement-feed-provider-win32.md b/hub/apps/develop/feeds/implement-feed-provider-win32.md index a4aef2db82..c2a70b61c4 100644 --- a/hub/apps/develop/feeds/implement-feed-provider-win32.md +++ b/hub/apps/develop/feeds/implement-feed-provider-win32.md @@ -104,7 +104,7 @@ struct FeedProvider : winrt::implements @@ -70,7 +70,7 @@ public MainWindow(string state) { this.InitializeComponent(); - _state = state; + SetState(state); } ``` @@ -117,9 +117,9 @@ Inside of the **uap3:AppExtension** element, add a [uap3:Properties](/uwp/schema myapp-copilothotkey://?state=Tap myapp-copilothotkey://?state=Down - myapp-copilothotkey:?//state=Up + myapp-copilothotkey://?state=Up - + ... ``` @@ -213,11 +213,9 @@ public MainWindow(string state) this.InitializeComponent(); hWndMain = (HWND)WinRT.Interop.WindowNative.GetWindowHandle(this); - Microsoft.UI.Windowing.AppWindow appWindow = AppWindow; - var propertyStoreGUID = new Guid("886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99"); - var hr = PInvoke.SHGetPropertyStoreForWindow((HWND)this.AppWindow.Id.Value, in propertyStoreGUID, out var propertyStore); + var hr = PInvoke.SHGetPropertyStoreForWindow(hWndMain, in propertyStoreGUID, out var propertyStore); var key = new PROPERTYKEY(); var copilotFastpathGUID = new Guid("38652BCA-4329-4E74-86F9-39CF29345EEA"); key.fmtid = copilotFastpathGUID; @@ -229,9 +227,9 @@ public MainWindow(string state) ((IPropertyStore)propertyStore).Commit(); SubClassDelegate = new Windows.Win32.UI.Shell.SUBCLASSPROC(WindowSubClass); - bool bRet = PInvoke.SetWindowSubclass((HWND)appWindow.Id.Value, SubClassDelegate, 0, 0); + bool bRet = PInvoke.SetWindowSubclass(hWndMain, SubClassDelegate, 0, 0); - _state = state; + SetState(state); } ``` diff --git a/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md b/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md index 7ad62c34f3..7358232861 100644 --- a/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md +++ b/hub/apps/develop/windows-integration/integrate-sharesheet-pwa.md @@ -42,7 +42,7 @@ The `share_target` member must contain the necessary information for the system }, ``` -When your app is selected by the user as the target for shared content, the PWA is launched. A `GET` HTTP request is made to the URL specified by the `action` property. The shared data is passed as the `title`, `text`, and `url` query parameters. The following request is made: `/handle-shared-content/?title=shared title&text=shared text&url=shared url`. +When your app is selected by the user as the target for shared content, the PWA is launched. A `POST` HTTP request is made to the URL specified by the `action` property. The shared data is posted to that URL when the share target is invoked. The following example illustrates how to register the scoped service worker: diff --git a/hub/apps/develop/windows-integration/recall/recall-web-browsers.md b/hub/apps/develop/windows-integration/recall/recall-web-browsers.md index defe258fca..5f883e35b1 100644 --- a/hub/apps/develop/windows-integration/recall/recall-web-browsers.md +++ b/hub/apps/develop/windows-integration/recall/recall-web-browsers.md @@ -10,7 +10,7 @@ no-loc: [Recall] Many web browsers support a concept of "InPrivate" browsing, where the user's history does not get saved. -To make sure that Recall doesn't save your user's browsing history while in modes like this, your app can use the [`SetInputScope`](/windows/win32/api/inputscope/nf-inputscope-setinputscope) function, setting the input scope to `IS_PASSWORD`. +To make sure that Recall doesn't save your user's browsing history while in modes like this, your app can use the [`SetInputScope`](/windows/win32/api/inputscope/nf-inputscope-setinputscope) function, setting the input scope to `IS_PRIVATE`. > [!IMPORTANT] > Your app must also have a `http` or `https` protocol handler registered before `SetInputScope` will support the behavior described in this article. @@ -24,7 +24,7 @@ private new enum InputScope : int IS_DEFAULT = 0, IS_URL = 1, IS_FILE_FULLFILEPATH = 2, - IS_PRIVATE = 0x1f // Input is treated as private (e.g. passwords) + IS_PRIVATE = 61 // Input is treated as private data. } private void EnterInPrivateMode()