From 56a6105a828d31ad4ba65129d1bb603e325a3642 Mon Sep 17 00:00:00 2001 From: Qiutong Shen Date: Thu, 21 May 2026 13:28:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(develop):=20UWP=E2=86=92WinAppSDK=20link=20?= =?UTF-8?q?migration=20=E2=80=94=20desktop=20&=20applifecycle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- hub/apps/desktop/modernize/ui/apply-mica-win32.md | 2 +- hub/apps/windows-app-sdk/applifecycle/focus-session.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hub/apps/desktop/modernize/ui/apply-mica-win32.md b/hub/apps/desktop/modernize/ui/apply-mica-win32.md index b6097ecb20..52e0d7bbb0 100644 --- a/hub/apps/desktop/modernize/ui/apply-mica-win32.md +++ b/hub/apps/desktop/modernize/ui/apply-mica-win32.md @@ -33,7 +33,7 @@ The MicaController reacts to the system Light and Dark themes by default. To ove > [!TIP] > The code in this section is taken from the [Windows App SDK Win32 Mica sample on GitHub](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Mica/cpp-win32). See the GitHub repo for the full code. These examples use [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/). -To enable Mica, you need a reference to the Windows App SDK, a [Compositor](/uwp/api/windows.ui.composition.compositor), and a [DispatcherQueue](/uwp/api/windows.system.dispatcherqueue). +To enable Mica, you need a reference to the Windows App SDK, a [Compositor](/windows/windows-app-sdk/api/winrt/microsoft.ui.composition.compositor), and a [DispatcherQueue](/uwp/api/windows.system.dispatcherqueue). This example shows how to do the following to set up an unpackaged app: diff --git a/hub/apps/windows-app-sdk/applifecycle/focus-session.md b/hub/apps/windows-app-sdk/applifecycle/focus-session.md index 4edbc31e95..defe8135cd 100644 --- a/hub/apps/windows-app-sdk/applifecycle/focus-session.md +++ b/hub/apps/windows-app-sdk/applifecycle/focus-session.md @@ -97,12 +97,12 @@ private void Manager_IsFocusActiveChanged(Windows.UI.Shell.FocusSessionManager s ```cpp // pch.h ... -#include +#include +#include // MainWindow.xaml.h ... -void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs const&); +void OnNavigatedTo(Microsoft::UI::Xaml::Navigation::NavigationEventArgs const&); Windows::UI::Shell::FocusSessionManager m_focusSessionManager = Windows::UI::Shell::FocusSessionManager::GetDefault(); winrt::event_token m_focusStateChangedToken; @@ -111,7 +111,7 @@ void OnFocusStateChanged(Windows::UI::Shell::FocusSessionManager const& sender, // MainWindow.xaml.cpp ... -void MainWindow::OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs const&) +void MainWindow::OnNavigatedTo(Microsoft::UI::Xaml::Navigation::NavigationEventArgs const&) { if (Windows::UI::Shell::FocusSessionManager::IsSupported()) {