From 370af5c3bdcc845ae29eee473cabea75832c8b0a Mon Sep 17 00:00:00 2001 From: Qiutong Shen Date: Tue, 19 May 2026 13:51:26 +0800 Subject: [PATCH] fix 18 --- .../accessibility/custom-automation-peers.md | 4 ++-- .../accessibility/high-contrast-themes.md | 12 ++++++------ .../accessibility/system-button-narration.md | 18 +++++++++--------- .../layout/boxpanel-example-custom-panel.md | 2 +- .../modernize/ui/apply-windows-themes.md | 2 +- ...ice-controls-for-photo-and-video-capture.md | 2 +- .../composition/pointer-input-animations.md | 2 +- .../develop/data-access/sqlite-data-access.md | 6 +++--- .../data/store-and-retrieve-app-data.md | 2 +- hub/apps/develop/devices-and-sensors.md | 2 +- hub/apps/develop/dispatcherqueue.md | 4 ++-- .../feeds/implement-feed-provider-win32.md | 4 ++-- .../files/change-tracking-filesystem.md | 4 ++-- .../develop/files/create-read-write-files.md | 6 +++--- .../files/music-pictures-videos-libraries.md | 2 +- hub/apps/develop/files/pickers-save-file.md | 4 ++-- .../develop/files/using-file-folder-pickers.md | 6 ++---- hub/apps/develop/input/handle-pointer-input.md | 4 ++-- .../develop/input/identify-input-devices.md | 2 +- .../launch/launch-default-apps-settings.md | 4 ++-- hub/apps/develop/security/use-cases.md | 2 +- .../develop/security/windows-hello-login.md | 4 ++-- hub/apps/develop/testing/index.md | 2 +- hub/apps/develop/ui/controls/animated-icon.md | 2 +- hub/apps/develop/ui/controls/buttons.md | 2 +- hub/apps/develop/ui/controls/combo-box.md | 2 +- .../ui/controls/controls-and-events-intro.md | 2 +- .../ui/controls/custom-transport-controls.md | 2 +- .../dialogs-and-flyouts/teaching-tip.md | 2 +- .../develop/ui/controls/listview-filtering.md | 2 +- .../navigation/navigate-between-two-pages.md | 2 +- hub/apps/develop/ui/sound.md | 4 ++-- .../windows-integration/copilot-key-state.md | 16 +++++++--------- .../recall/recall-web-browsers.md | 4 ++-- .../applifecycle/applifecycle-power.md | 8 ++++---- .../applifecycle/background-tasks.md | 2 +- .../guides/toast-notifications.md | 2 +- .../winui3/xaml-templated-controls-winui-3.md | 2 +- 38 files changed, 75 insertions(+), 79 deletions(-) diff --git a/hub/apps/design/accessibility/custom-automation-peers.md b/hub/apps/design/accessibility/custom-automation-peers.md index 6cf6d02295..0058fcbe0d 100644 --- a/hub/apps/design/accessibility/custom-automation-peers.md +++ b/hub/apps/design/accessibility/custom-automation-peers.md @@ -97,7 +97,7 @@ All classes that derive from [**UIElement**](/windows/windows-app-sdk/api/winrt/ If you are writing a custom control and supplying a custom peer, override [**OnCreateAutomationPeer**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.uielement.oncreateautomationpeer) so it returns a new instance of your peer type. The peer must derive directly or indirectly from [**AutomationPeer**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Automation.Peers.AutomationPeer). -For example, the following code declares that custom control `NumericUpDown` uses `NumericUpDownPeer` for UI Automation. +For example, the following code declares that custom control `NumericUpDown` uses `NumericUpDownAutomationPeer` for UI Automation. ```csharp using Microsoft.UI.Xaml.Automation.Peers; @@ -200,7 +200,7 @@ End Sub import "NumericUpDown.idl"; namespace MyNamespace { - runtimeclass NumericUpDownAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.AutomationPeer + runtimeclass NumericUpDownAutomationPeer : Microsoft.UI.Xaml.Automation.Peers.RangeBaseAutomationPeer { NumericUpDownAutomationPeer(NumericUpDown owner); Int32 MyProperty; diff --git a/hub/apps/design/accessibility/high-contrast-themes.md b/hub/apps/design/accessibility/high-contrast-themes.md index fc634013a7..ebf1d32cf4 100644 --- a/hub/apps/design/accessibility/high-contrast-themes.md +++ b/hub/apps/design/accessibility/high-contrast-themes.md @@ -83,12 +83,12 @@ The following table lists the contrast-theme **SystemColor** resources and recom |---------|---------| |:::image source="images/sys-color/aquatic-color-window.png" alt-text="Color swatch of SystemColorWindowColor used for background of pages, panes, popups, and windows.":::| **SystemColorWindowColor**
Background of pages, panes, popups, and windows.

Pair with **SystemColorWindowTextColor** | |:::image source="images/sys-color/aquatic-color-windowtext.png" alt-text="Color swatch of SystemColorWindowTextColor used for headings, body copy, lists, placeholder text, app and window borders, any UI that can't be interacted with."::: | **SystemColorWindowTextColor**
Headings, body copy, lists, placeholder text, app and window borders, any UI that can't be interacted with.

Pair with **SystemColorWindowColor** | -|:::image source="images/sys-color/aquatic-color-hotlight.png" alt-text="Color swatch of SystemColorWindowTextColor used for hyperlinks.":::| **SystemColorHotlightColor**
Hyperlinks.

Pair with **SystemColorWindowColor** | -|:::image source="images/sys-color/aquatic-color-graytext.png" alt-text="Color swatch of SystemColorWindowTextColor used for inactive or disabled UI.":::| **SystemColorGrayTextColor**
Inactive or disabled UI.

Pair with **SystemColorWindowColor** | -|:::image source="images/sys-color/aquatic-color-highlighttext.png" alt-text="Color swatch of SystemColorWindowTextColor used for foreground color of text or UI that is selected, interacted with (hover, pressed), or in progress.":::| **SystemColorHighlightTextColor**
Foreground color of text or UI that is selected, interacted with (hover, pressed), or in progress.

Pair with **SystemColorHighlightColor** | -|:::image source="images/sys-color/aquatic-color-highlight.png" alt-text="Color swatch of SystemColorWindowTextColor used for background or accent color of UI that is selected, interacted with (hover, pressed), or in progress.":::| **SystemColorHighlightColor**
Background or accent color of UI that is selected, interacted with (hover, pressed), or in progress.

Pair with **SystemColorHighlightTextColor** | -|:::image source="images/sys-color/aquatic-color-btntext.png" alt-text="Color swatch of SystemColorWindowTextColor used for foreground color of buttons and any UI that can be interacted with.":::| **SystemColorButtonTextColor**
Foreground color of buttons and any UI that can be interacted with.

Pair with **SystemColorButtonFaceColor** | -|:::image source="images/sys-color/aquatic-color-3dface.png" alt-text="Color swatch of SystemColorWindowTextColor used for background color of buttons and any UI that can be interacted with.":::| **SystemColorButtonFaceColor**
Background color of buttons and any UI that can be interacted with.

Pair with **SystemColorButtonTextColor** | +|:::image source="images/sys-color/aquatic-color-hotlight.png" alt-text="Color swatch of SystemColorHotlightColor used for hyperlinks.":::| **SystemColorHotlightColor**
Hyperlinks.

Pair with **SystemColorWindowColor** | +|:::image source="images/sys-color/aquatic-color-graytext.png" alt-text="Color swatch of SystemColorGrayTextColor used for inactive or disabled UI.":::| **SystemColorGrayTextColor**
Inactive or disabled UI.

Pair with **SystemColorWindowColor** | +|:::image source="images/sys-color/aquatic-color-highlighttext.png" alt-text="Color swatch of SystemColorHighlightTextColor used for foreground color of text or UI that is selected, interacted with (hover, pressed), or in progress.":::| **SystemColorHighlightTextColor**
Foreground color of text or UI that is selected, interacted with (hover, pressed), or in progress.

Pair with **SystemColorHighlightColor** | +|:::image source="images/sys-color/aquatic-color-highlight.png" alt-text="Color swatch of SystemColorHighlightColor used for background or accent color of UI that is selected, interacted with (hover, pressed), or in progress.":::| **SystemColorHighlightColor**
Background or accent color of UI that is selected, interacted with (hover, pressed), or in progress.

Pair with **SystemColorHighlightTextColor** | +|:::image source="images/sys-color/aquatic-color-btntext.png" alt-text="Color swatch of SystemColorButtonTextColor used for foreground color of buttons and any UI that can be interacted with.":::| **SystemColorButtonTextColor**
Foreground color of buttons and any UI that can be interacted with.

Pair with **SystemColorButtonFaceColor** | +|:::image source="images/sys-color/aquatic-color-3dface.png" alt-text="Color swatch of SystemColorButtonFaceColor used for background color of buttons and any UI that can be interacted with.":::| **SystemColorButtonFaceColor**
Background color of buttons and any UI that can be interacted with.

Pair with **SystemColorButtonTextColor** | The next table shows practical examples using **SystemColorWindowColor** as the background baseline. diff --git a/hub/apps/design/accessibility/system-button-narration.md b/hub/apps/design/accessibility/system-button-narration.md index 8a1009278e..06d380ee32 100644 --- a/hub/apps/design/accessibility/system-button-narration.md +++ b/hub/apps/design/accessibility/system-button-narration.md @@ -67,7 +67,7 @@ It is common for more than one of the supported events to fire when the Fn butto 3. This third snippet includes the corresponding event handler delegates for each event supported by the [SystemButtonEventController](/uwp/api/windows.ui.input.systembuttoneventcontroller) object. - Each event handler announces the event that has occurred. In addition, the FunctionLockIndicatorChanged handler also controls whether the app is in "Learning" mode (`_isLearningMode` = true), which prevents the event from bubbling to other handlers and lets the user explore keyboard features without actually performing the action. + Each event handler announces the event that has occurred. In addition, the SystemFunctionLockIndicatorChanged handler also controls whether the app is in "Learning" mode (`_isLearningMode` = true), which prevents the event from bubbling to other handlers and lets the user explore keyboard features without actually performing the action. ```cppwinrt void SetupSystemButtonEventController() @@ -80,8 +80,8 @@ It is common for more than one of the supported events to fire when the Fn butto _controller = winrt::SystemButtonEventController::CreateForDispatcherQueue(_queue); // Add Event Handler for each different event - _fnKeyDownToken = _controller->FunctionButtonPressed( - [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: FunctionButtonEventArgs& args) + _fnKeyDownToken = _controller->SystemFunctionButtonPressed( + [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: SystemFunctionButtonEventArgs& args) { // Mock function to read the sentence "Fn button is pressed" PronounceFunctionButtonPressedMock(); @@ -90,8 +90,8 @@ It is common for more than one of the supported events to fire when the Fn butto args.Handled(true); }); - _fnKeyUpToken = _controller->FunctionButtonReleased( - [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: FunctionButtonEventArgs& args) + _fnKeyUpToken = _controller->SystemFunctionButtonReleased( + [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: SystemFunctionButtonEventArgs& args) { // Mock function to read the sentence "Fn button is up" PronounceFunctionButtonReleasedMock(); @@ -100,8 +100,8 @@ It is common for more than one of the supported events to fire when the Fn butto args.Handled(true); }); - _fnLockToken = _controller->FunctionLockChanged( - [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: FunctionLockChangedEventArgs& args) + _fnLockToken = _controller->SystemFunctionLockChanged( + [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: SystemFunctionLockChangedEventArgs& args) { // Mock function to read the sentence "Fn shift is locked/unlocked" PronounceFunctionLockMock(args.IsLocked()); @@ -110,8 +110,8 @@ It is common for more than one of the supported events to fire when the Fn butto args.Handled(true); }); - _fnLockIndicatorToken = _controller->FunctionLockIndicatorChanged( - [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: FunctionLockIndicatorChangedEventArgs& args) + _fnLockIndicatorToken = _controller->SystemFunctionLockIndicatorChanged( + [](const winrt::SystemButtonEventController& /*sender*/, const winrt:: SystemFunctionLockIndicatorChangedEventArgs& args) { // Mock function to read the sentence "Fn lock indicator is on/off" PronounceFunctionLockIndicatorMock(args.IsIndicatorOn()); diff --git a/hub/apps/design/layout/boxpanel-example-custom-panel.md b/hub/apps/design/layout/boxpanel-example-custom-panel.md index 9283395139..8951b0ff54 100644 --- a/hub/apps/design/layout/boxpanel-example-custom-panel.md +++ b/hub/apps/design/layout/boxpanel-example-custom-panel.md @@ -137,7 +137,7 @@ Size LimitUnboundedSize(Size input) { if (Double.IsInfinity(input.Height)) { - input.Height = maxcellheight * colcount; + input.Height = maxcellheight * rowcount; cellheight = maxcellheight; } return input; diff --git a/hub/apps/desktop/modernize/ui/apply-windows-themes.md b/hub/apps/desktop/modernize/ui/apply-windows-themes.md index ae877c2cce..101c180d6e 100644 --- a/hub/apps/desktop/modernize/ui/apply-windows-themes.md +++ b/hub/apps/desktop/modernize/ui/apply-windows-themes.md @@ -229,7 +229,7 @@ HRESULT DwmSetWindowAttribute( ); ``` -After passing `hWnd` (the handle to the window you want to change) as your first parameter, you need to pass in `DWMWA_USE_IMMERSIVE_DARK_MODE` as the `dwAttribute` parameter. This is a constant in the DWM API that lets the Windows frame be drawn in Dark mode colors when the Dark mode system setting is enabled. If you switch to Light mode, you will have to change `DWMWA_USE_IMMERSIVE_DARK_MODE` from 20 to 0 for the title bar to be drawn in light mode colors. +After passing `hWnd` (the handle to the window you want to change) as your first parameter, you need to pass in `DWMWA_USE_IMMERSIVE_DARK_MODE` as the `dwAttribute` parameter. This is a constant in the DWM API that lets the Windows frame be drawn in Dark mode colors when the Dark mode system setting is enabled. If you switch to Light mode, keep `DWMWA_USE_IMMERSIVE_DARK_MODE` unchanged and set the `BOOL` passed through `pvAttribute` to `FALSE` for the title bar to be drawn in light mode colors. The `pvAttribute` parameter points to a value of type `BOOL` (which is why you made the `BOOL` value earlier). You need `pvAttribute` to be `TRUE` to honor Dark mode for the window. If `pvAttribute` is `FALSE`, the window will use Light Mode. 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..9df8c638dd 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 @@ -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/composition/pointer-input-animations.md b/hub/apps/develop/composition/pointer-input-animations.md index 9f60f87fa1..826a5c840b 100644 --- a/hub/apps/develop/composition/pointer-input-animations.md +++ b/hub/apps/develop/composition/pointer-input-animations.md @@ -59,7 +59,7 @@ Let's take a look at an example where we leverage the Hover position of a Mouse The image is a UIElement, so let's first get a reference to the PointerPositionPropertySet ```csharp -_pointerPositionPropSet = ElementCompositionPreview.GetPointerPositionPropertySet(UIElement element); +_pointerPositionPropSet = ElementCompositionPreview.GetPointerPositionPropertySet(element); ``` In this sample, you have two Expressions at play: diff --git a/hub/apps/develop/data-access/sqlite-data-access.md b/hub/apps/develop/data-access/sqlite-data-access.md index fe662de6b0..73b810dd09 100644 --- a/hub/apps/develop/data-access/sqlite-data-access.md +++ b/hub/apps/develop/data-access/sqlite-data-access.md @@ -19,7 +19,7 @@ This tutorial shows you how to integrate SQLite into your WinUI application usin In this tutorial, you'll learn how to: -- Configure your Windows app to use SQLite with the Microsoft.Data.SQLite library +- Configure your Windows app to use SQLite with the Microsoft.Data.Sqlite library - Create and initialize a local database - Implement secure data insertion and retrieval methods - Build a simple user interface to interact with your data @@ -74,7 +74,7 @@ The [Microsoft.Data.Sqlite](/dotnet/api/microsoft.data.sqlite) library implement The rest of this guide helps you to use this library. -## Set up your solution to use the Microsoft.Data.SQLite library +## Set up your solution to use the Microsoft.Data.Sqlite library We'll start with a basic WinUI project, and then install the SQLite NuGet package. See [Create a WinUI app](/windows/apps/tutorials/winui-notes/intro) for instructions on how to create your first WinUI project. @@ -94,7 +94,7 @@ Let's start by adding a class to your project named **DataAccess**. If you plan At this point, you have a choice. You can use the version of SQLite that is included with Windows or if you have some reason to use a specific version of SQLite, you can include the SQLite library in your package. We are going to use the version of SQLite that's included with Windows. -1. Choose the **Browse** tab, search for the **Microsoft.Data.SQLite** package, and then install the latest stable version. +1. Choose the **Browse** tab, search for the **Microsoft.Data.Sqlite** package, and then install the latest stable version. ![SQLite NuGet package](images/sqlite-nuget-package.png) diff --git a/hub/apps/develop/data/store-and-retrieve-app-data.md b/hub/apps/develop/data/store-and-retrieve-app-data.md index 7672fa5680..a950585f39 100644 --- a/hub/apps/develop/data/store-and-retrieve-app-data.md +++ b/hub/apps/develop/data/store-and-retrieve-app-data.md @@ -271,7 +271,7 @@ localSettings.DeleteContainer("exampleContainer"); ## Versioning your app data -You can optionally version the app data for your app. This would enable you to create a future version of your app that changes the format of its app data without causing compatibility problems with the previous version of your app. The app checks the version of the app data in the data store, and if the version is less than the version the app expects, the app should update the app data to the new format and update the version. For more info, see the[**Application.Version**](/uwp/api/windows.storage.applicationdata.version) property and the [**ApplicationData.SetVersionAsync**](/uwp/api/windows.storage.applicationdata.setversionasync) method. +You can optionally version the app data for your app. This would enable you to create a future version of your app that changes the format of its app data without causing compatibility problems with the previous version of your app. The app checks the version of the app data in the data store, and if the version is less than the version the app expects, the app should update the app data to the new format and update the version. For more info, see the [**ApplicationData.Version**](/uwp/api/windows.storage.applicationdata.version) property and the [**ApplicationData.SetVersionAsync**](/uwp/api/windows.storage.applicationdata.setversionasync) method. ## Related articles diff --git a/hub/apps/develop/devices-and-sensors.md b/hub/apps/develop/devices-and-sensors.md index fef553186f..2bbc4bb4b2 100644 --- a/hub/apps/develop/devices-and-sensors.md +++ b/hub/apps/develop/devices-and-sensors.md @@ -15,7 +15,7 @@ This article provides an index of development features that are related to scena ## Windows OS features -Windows 10 and later OS releases provide a wide variety of APIs related to data and files scenarios for apps. These features are available via a combination of WinRT and Win32 (C++ and COM) APIs provided by the [Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk). +Windows 10 and later OS releases provide a wide variety of APIs related to devices and sensors scenarios for apps. These features are available via a combination of WinRT and Win32 (C++ and COM) APIs provided by the [Windows SDK](https://developer.microsoft.com/windows/downloads/windows-sdk). #### WinRT APIs diff --git a/hub/apps/develop/dispatcherqueue.md b/hub/apps/develop/dispatcherqueue.md index cc04aed321..8d11c73e06 100644 --- a/hub/apps/develop/dispatcherqueue.md +++ b/hub/apps/develop/dispatcherqueue.md @@ -18,7 +18,7 @@ ms.localizationpriority: high * It provides a means to register a delegate that's called when a timeout expires. * It provides events that let components know when a message loop is exiting, and optionally defer that shutdown until outstanding work completes. That ensures components that use the **DispatcherQueue**, but don't own the message loop, may do cleanup on-thread as the loop exits. * The **DispatcherQueue** is a thread singleton (there can be at most one of them running on any given thread). By default, a thread has no **DispatcherQueue**. -* A thread owner may create a [DispatcherQueueController](/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller) to initialize the **DispatcherQueue** for the thread. At that point, any code can access the thread's **DispatcherQueue**; but only the **DispatcherQueueController**'s owner has access to the [DispatcherQueueController.ShutdownQueue](/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.shutdownqueue) method, which drains the **DispatcherQueue**, and raises **ShutdownStarted** and **ShutdownCompleted** events. +* A thread owner may create a [DispatcherQueueController](/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller) to initialize the **DispatcherQueue** for the thread. At that point, any code can access the thread's **DispatcherQueue**; but only the **DispatcherQueueController**'s owner has access to the [DispatcherQueueController.ShutdownQueue](/windows/windows-app-sdk/api/winrt/microsoft.ui.dispatching.dispatcherqueuecontroller.shutdownqueue) method, which drains the **DispatcherQueue**, and raises **ShutdownStarting** and **ShutdownCompleted** events. * An outermost message loop owner must create a **DispatcherQueue** instance. Only the code in charge of running a thread's outermost message loop knows when dispatch is complete, which is the appropriate time to shut down the **DispatcherQueue**. That means that components that rely on **DispatcherQueue** mustn't create the **DispatcherQueue** unless they own the thread's message loop. ## Run-down @@ -166,7 +166,7 @@ void Main() // Create a Windows App SDK DispatcherQueue. auto dispatcherQueueController{winrt::DispatcherQueueController::CreateOnCurrentThread()}; - var appWindow = AppWindow.Create(nullptr, 0, dispatcherQueueController.DispatcherQueue()); + auto appWindow = AppWindow::Create(nullptr, 0, dispatcherQueueController.DispatcherQueue()); // Since we associated the DispatcherQueue above with the AppWindow, we're able to retrieve it // as a property. If we were to not associate a dispatcher, this property would be null. diff --git a/hub/apps/develop/feeds/implement-feed-provider-win32.md b/hub/apps/develop/feeds/implement-feed-provider-win32.md index a4aef2db82..f75417aac8 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 **Important APIs**: [**Windows.Devices.Input**](/uwp/api/Windows.Devices.Input), [**Windows.UI.Input**](/uwp/api/Windows.UI.Core), [**Windows.UI.Xaml.Input**](/uwp/api/Windows.UI.Input) +> **Important APIs**: [**Windows.Devices.Input**](/uwp/api/Windows.Devices.Input), [**Windows.UI.Input**](/uwp/api/Windows.UI.Input), [**Windows.UI.Xaml.Input**](/uwp/api/Windows.UI.Xaml.Input) ## Retrieve mouse properties diff --git a/hub/apps/develop/launch/launch-default-apps-settings.md b/hub/apps/develop/launch/launch-default-apps-settings.md index 92b7aae200..f23bfac57d 100644 --- a/hub/apps/develop/launch/launch-default-apps-settings.md +++ b/hub/apps/develop/launch/launch-default-apps-settings.md @@ -32,7 +32,7 @@ There are three query string parameters. The query string parameter to be used d >[!NOTE] >To get the registeredAUMID query string parameter to work after an OS upgrade, an app may need to increment its TargetDeviceFamily...MaxVersionTested value in its manifest. This will ensure that the app is reindexed for the user, which in turn will update the appropriate definitions used to process the deep link via protocol activation. MaxVersionTested should be updated to `10.0.22000.1817` for Windows 11, version 21H2 or `10.0.22621.1555` for Windows 11, version 22H2. -In the following example, `LaunchUriAsync` is called to launch Windows Settings. The `ms-settings:defaultapps` Uri specifies that the Default Apps settings page should be shown. Next, the app that should be launched is determined. As an example, “Microsoft Edge” was registered by the app in HKEY_LOCAL_MACHINE\Software\RegisteredApplications. Since it is a per machine installed app, `registeredAppMachine` is the query string parameter that should be used. The optional query string parameter `registeredAppMachine` is set to the registered name, escaped with a call to `Url.EscapeDataString`, to specify that the page for **Microsoft Edge** should be shown. +In the following example, `LaunchUriAsync` is called to launch Windows Settings. The `ms-settings:defaultapps` Uri specifies that the Default Apps settings page should be shown. Next, the app that should be launched is determined. As an example, “Microsoft Edge” was registered by the app in HKEY_LOCAL_MACHINE\Software\RegisteredApplications. Since it is a per machine installed app, `registeredAppMachine` is the query string parameter that should be used. The optional query string parameter `registeredAppMachine` is set to the registered name, escaped with a URI escaping helper, to specify that the page for **Microsoft Edge** should be shown. ```csharp private async void LaunchSettingsPage_Click(object sender, RoutedEventArgs e) @@ -42,7 +42,7 @@ private async void LaunchSettingsPage_Click(object sender, RoutedEventArgs e) ``` ```cppwinrt -bool result = co_await Windows::System::Launcher::LaunchUriAsync(Windows::Foundation::Uri(L"ms-settings:defaultapps?registeredAppMachine=" + Uri::EscapeDataString(L"Microsoft Edge"))); +bool result = co_await Windows::System::Launcher::LaunchUriAsync(Windows::Foundation::Uri(L"ms-settings:defaultapps?registeredAppMachine=" + Windows::Foundation::Uri::EscapeComponent(L"Microsoft Edge"))); ``` ## Related content diff --git a/hub/apps/develop/security/use-cases.md b/hub/apps/develop/security/use-cases.md index 514613b9e0..04e862ecbd 100644 --- a/hub/apps/develop/security/use-cases.md +++ b/hub/apps/develop/security/use-cases.md @@ -148,7 +148,7 @@ navigator.credentials.create({ // User-friendly name of your service. name: "Passkeys Developer", // Relying party (RP) identifier (hostname/FQDN). - id: passkeys.contoso" + id: "passkeys.contoso" }, user: { diff --git a/hub/apps/develop/security/windows-hello-login.md b/hub/apps/develop/security/windows-hello-login.md index 0172d190e8..9c4f851260 100644 --- a/hub/apps/develop/security/windows-hello-login.md +++ b/hub/apps/develop/security/windows-hello-login.md @@ -494,7 +494,7 @@ In this exercise you will learn how to check if Windows Hello is setup on the ma - Now that you have created the **CreateWindowsHelloKeyAsync** method, return to the Login.xaml.cs file and uncomment the code inside the SignInWindowsHelloAsync method. ```cs - private async void SignInWindowsHelloAsync() + private async Task SignInWindowsHelloAsync() { if (AccountHelper.ValidateAccountCredentials(UsernameTextBox.Text)) { @@ -631,7 +631,7 @@ In this exercise, you will continue from the previous exercise. When a user succ - In the **SignInWindowsHelloAsync** method (in Login.xaml.cs), once the **CreateWindowsHelloKeyAsync** is successful, it should navigate to the **Welcome** page and pass the **Account**. ```cs - private async void SignInWindowsHelloAsync() + private async Task SignInWindowsHelloAsync() { if (AccountHelper.ValidateAccountCredentials(UsernameTextBox.Text)) { diff --git a/hub/apps/develop/testing/index.md b/hub/apps/develop/testing/index.md index 2fa8694ac2..39854f2e1e 100644 --- a/hub/apps/develop/testing/index.md +++ b/hub/apps/develop/testing/index.md @@ -125,7 +125,7 @@ namespace WinUITest1 11. Open the UserControl1.xaml.cs code-behind file. For this example, we add a new public method called `GetSeven` that simply returns an integer. ```csharp - namespace WinUICLassLibrary1 + namespace WinUIClassLibrary1 { public sealed partial class UserControll : UserControl { diff --git a/hub/apps/develop/ui/controls/animated-icon.md b/hub/apps/develop/ui/controls/animated-icon.md index 3e6675ae31..a273963c0e 100644 --- a/hub/apps/develop/ui/controls/animated-icon.md +++ b/hub/apps/develop/ui/controls/animated-icon.md @@ -49,7 +49,7 @@ Defining a color property in your Lottie animation named "Foreground" lets you t ## Recommendations -- Please view the UX guidance for [Icons for Windows Apps](/windows/uwp/design/style/icons) to ensure your icons match the design principles. +- Please view the UX guidance for [Icons for Windows Apps](/windows/apps/design/style/icons) to ensure your icons match the design principles. - Limit the number of animated icons on a single screen or view. Only animate icons to draw the user's attention to where they need to take action or when they are performing an action. ## Create an animated icon diff --git a/hub/apps/develop/ui/controls/buttons.md b/hub/apps/develop/ui/controls/buttons.md index e5b6496924..194eebbcc0 100644 --- a/hub/apps/develop/ui/controls/buttons.md +++ b/hub/apps/develop/ui/controls/buttons.md @@ -238,7 +238,7 @@ private void Decrease_Click(object sender, RoutedEventArgs e) > [!div class="checklist"] > -> - **Important APIs**: [DropDownButton class](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.button), [Flyout property](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.button.flyout) +> - **Important APIs**: [DropDownButton class](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.dropdownbutton), [Flyout property](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.button.flyout) > [!div class="nextstepaction"] > [Open the WinUI 3 Gallery app and see the DropdownButton in action](winui3gallery://item/DropdownButton) diff --git a/hub/apps/develop/ui/controls/combo-box.md b/hub/apps/develop/ui/controls/combo-box.md index d928231062..56778c973f 100644 --- a/hub/apps/develop/ui/controls/combo-box.md +++ b/hub/apps/develop/ui/controls/combo-box.md @@ -228,7 +228,7 @@ If the newly entered value is not valid, you use the SelectedValue to revert the ```csharp private void FontSizeComboBox_TextSubmitted(ComboBox sender, ComboBoxTextSubmittedEventArgs e) { - if (byte.TryParse(e.Text, out double newValue)) + if (double.TryParse(e.Text, out double newValue)) { // Update the app's font size. _fontSize = newValue; diff --git a/hub/apps/develop/ui/controls/controls-and-events-intro.md b/hub/apps/develop/ui/controls/controls-and-events-intro.md index 81050e5ee9..f76870475d 100644 --- a/hub/apps/develop/ui/controls/controls-and-events-intro.md +++ b/hub/apps/develop/ui/controls/controls-and-events-intro.md @@ -153,7 +153,7 @@ Button1().Click({ this, &MainPage::Button1_Click }); ## Related topics - [Index of controls by function](../../../design/controls/index.md) -- [Windows.UI.Xaml.Controls namespace](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls) +- [Microsoft.UI.Xaml.Controls namespace](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls) - [Layout](../../../design/layout/index.md) - [Style](../../../design/style/index.md) - [Usability](../../../design/usability/index.md) diff --git a/hub/apps/develop/ui/controls/custom-transport-controls.md b/hub/apps/develop/ui/controls/custom-transport-controls.md index 0834f66bdd..451a5e88cd 100644 --- a/hub/apps/develop/ui/controls/custom-transport-controls.md +++ b/hub/apps/develop/ui/controls/custom-transport-controls.md @@ -15,7 +15,7 @@ ms.localizationpriority: medium MediaPlayerElement has customizable XAML transport controls to manage control of audio and video content within a Windows app. Here, we demonstrate how to customize the MediaTransportControls template. We'll show you how to work with the overflow menu, add a custom button and modify the slider. -> **Important APIs**: [MediaPlayerElement](/uwp/api/windows.ui.xaml.controls.mediaplayerelement), [MediaPlayerElement.AreTransportControlsEnabled](/uwp/api/windows.ui.xaml.controls.mediaplayerelement.aretransportcontrolsenabled), [MediaTransportControls](/uwp/api/Windows.Media.SystemMediaTransportControls) +> **Important APIs**: [MediaPlayerElement](/uwp/api/windows.ui.xaml.controls.mediaplayerelement), [MediaPlayerElement.AreTransportControlsEnabled](/uwp/api/windows.ui.xaml.controls.mediaplayerelement.aretransportcontrolsenabled), [MediaTransportControls](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.mediatransportcontrols) Before starting, you should be familiar with the MediaPlayerElement and the MediaTransportControls classes. For more info, see the MediaPlayerElement control guide. diff --git a/hub/apps/develop/ui/controls/dialogs-and-flyouts/teaching-tip.md b/hub/apps/develop/ui/controls/dialogs-and-flyouts/teaching-tip.md index da45551b31..dc2cc7add4 100644 --- a/hub/apps/develop/ui/controls/dialogs-and-flyouts/teaching-tip.md +++ b/hub/apps/develop/ui/controls/dialogs-and-flyouts/teaching-tip.md @@ -255,7 +255,7 @@ An icon can be added beside the title and subtitle using the [IconSource](/windo diff --git a/hub/apps/develop/ui/controls/listview-filtering.md b/hub/apps/develop/ui/controls/listview-filtering.md index 7d4ba29390..f15e68828f 100644 --- a/hub/apps/develop/ui/controls/listview-filtering.md +++ b/hub/apps/develop/ui/controls/listview-filtering.md @@ -22,7 +22,7 @@ To implement text filtering, your app will need a [ListView](/windows/windows-ap The following XAML shows a UI with a simple ListView along with an accompanying TextBox. In this example, the ListView displays a collection of `Contact` objects. `Contact` is a class defined in the code-behind, and each `Contact` object has the following properties: `FirstName`, `LastName`, and `Company`. -The user can type a filtering term into the TextBox to filter the list of `Contact` objects by last name. The TextBox has it's `x:Name` attribute set (`FilterByLastName`) so you can access the TextBox's [Text](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.textbox.text) property in the code-behind. You also handle it's [TextChanged](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.textbox.textchanged) event (`OnFilterChanged`). The TextChanged event occurs whenever the user types in the TextBox, letting you perform a filtering operation upon receiving user input. +The user can type a filtering term into the TextBox to filter the list of `Contact` objects by last name. The TextBox has its `x:Name` attribute set (`FilterByLastName`) so you can access the TextBox's [Text](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.textbox.text) property in the code-behind. You also handle its [TextChanged](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.textbox.textchanged) event (`OnFilterChanged`). The TextChanged event occurs whenever the user types in the TextBox, letting you perform a filtering operation upon receiving user input. For filtering to work, the ListView must have a data source that can be manipulated in the code-behind, such as an [ObservableCollection\](/dotnet/api/system.collections.objectmodel.observablecollection-1). In this case, the ListView's [ItemsSource](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.itemscontrol.itemssource) property is assigned to an `ObservableCollection` in the code-behind. diff --git a/hub/apps/develop/ui/navigation/navigate-between-two-pages.md b/hub/apps/develop/ui/navigation/navigate-between-two-pages.md index a88087fa85..cae6e63f36 100644 --- a/hub/apps/develop/ui/navigation/navigate-between-two-pages.md +++ b/hub/apps/develop/ui/navigation/navigate-between-two-pages.md @@ -441,7 +441,7 @@ using namespace winrt::Microsoft::UI::Xaml::Media::Animation; // ... -void winrt::BasicNavigation::implementation::MainPage::HyperlinkButton_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) +void winrt::BasicNavigation::implementation::Page2::HyperlinkButton_Click(winrt::Windows::Foundation::IInspectable const& sender, winrt::Microsoft::UI::Xaml::RoutedEventArgs const& e) { // Create the slide transition and set the transition effect to FromLeft. SlideNavigationTransitionInfo slideEffect = SlideNavigationTransitionInfo(); diff --git a/hub/apps/develop/ui/sound.md b/hub/apps/develop/ui/sound.md index bc40baf8a6..89d7cefab3 100644 --- a/hub/apps/develop/ui/sound.md +++ b/hub/apps/develop/ui/sound.md @@ -63,14 +63,14 @@ Where maximum volume (relative to system volume) is 1.0, and minimum is 0.0 (ess If a control's default sound is not desired, it can be disabled. This is done through the **ElementSoundMode** on the control. -The **ElementSoundMode** has two states: **Off** and **Default**. When not set, it is **Default**. If set to **Off**, every sound that control plays will be muted *except for focus*. +The **ElementSoundMode** has three states: **Default**, **FocusOnly**, and **Off**. When not set, it is **Default**. If set to **FocusOnly**, only focus sounds play. If set to **Off**, no sounds play for that control. ```XAML