Skip to content

Commit e71de22

Browse files
qiutongMSQiutong ShenCopilot
authored
Migrate notifications docs from UWP to WinUI 3 (#5909)
- Update XAML namespaces: Windows.UI.Xaml -> Microsoft.UI.Xaml (C# and C++) - Update XAML API links: /uwp/api/Windows.UI.Xaml -> /windows/windows-app-sdk/api/winrt/microsoft.ui.xaml - Replace UWP sample links with Windows App SDK notifications sample Files updated: - wns-overview.md (XAML code samples) - choosing-a-notification-delivery-method.md (5 sample links) - badges.md (1 sample link) Note: Windows.UI.Notifications APIs are Windows SDK (not XAML) and remain as /uwp/api/ Co-authored-by: Qiutong Shen <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 2eedb8e commit e71de22

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

hub/apps/develop/notifications/badges.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private void clearBadge()
115115

116116
## Get the sample code
117117

118-
* [Notifications sample](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)<br/> Shows how to create live tiles, send badge updates, and display toast notifications.
118+
* [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)<br/> Shows how to send app notifications and badge updates.
119119

120120
## Related articles
121121

hub/apps/develop/notifications/choosing-a-notification-delivery-method.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ For more information, see these topics:
106106

107107
- [Send a local tile notification](/windows/uwp/launch-resume/sending-a-local-tile-notification)
108108
- [Send a local app notification](app-notifications/app-notifications-quickstart.md)
109-
- [Windows app notifications code samples](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)
109+
- [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)
110110

111111
## Scheduled notifications
112112

@@ -120,7 +120,7 @@ By default, scheduled notifications expire three days from the time they are del
120120
For more information, see these topics:
121121

122122
- [Schedule an app notification](app-notifications/app-notifications-scheduled.md)
123-
- [Windows app notifications code samples](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)
123+
- [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)
124124

125125
## Periodic notifications
126126

@@ -134,7 +134,7 @@ By default, periodic notifications expire three days from the time polling occur
134134
For more information, see these topics:
135135

136136
- [Periodic notification overview](periodic-notification-overview.md)
137-
- [Windows app notifications code samples](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)
137+
- [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)
138138

139139
## Push notifications
140140

@@ -149,7 +149,7 @@ For more information, see:
149149

150150
- [Windows Push Notification Services (WNS) overview](push-notifications/wns-overview.md)
151151
- [Guidelines for push notifications](push-notifications/index.md)
152-
- [Windows app notifications code samples](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)
152+
- [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)
153153

154154

155155
## Related topics
@@ -161,7 +161,7 @@ For more information, see:
161161
* [Guidelines for toast notifications](app-notifications/index.md)
162162
* [Periodic notification overview](periodic-notification-overview.md)
163163
* [Windows Push Notification Services (WNS) overview](push-notifications/wns-overview.md)
164-
* [Windows app notifications code samples on GitHub](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Notifications)
164+
* [Windows App SDK notifications sample](https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/Notifications)
165165

166166

167167

hub/apps/develop/notifications/push-notifications/wns-overview.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ Here's an example of how to check whether battery saver is turned on in Windows
168168
169169
```csharp
170170
using System;
171-
using Windows.UI.Xaml;
172-
using Windows.UI.Xaml.Controls;
173-
using Windows.UI.Xaml.Navigation;
171+
using Microsoft.UI.Xaml;
172+
using Microsoft.UI.Xaml.Controls;
173+
using Microsoft.UI.Xaml.Navigation;
174174
using Windows.System;
175175
using Windows.System.Power;
176176
...
@@ -216,16 +216,16 @@ async public void CheckForEnergySaving()
216216
#include <winrt/Windows.Storage.h>
217217
#include <winrt/Windows.System.h>
218218
#include <winrt/Windows.System.Power.h>
219-
#include <winrt/Windows.UI.Xaml.h>
220-
#include <winrt/Windows.UI.Xaml.Controls.h>
221-
#include <winrt/Windows.UI.Xaml.Navigation.h>
219+
#include <winrt/Microsoft.UI.Xaml.h>
220+
#include <winrt/Microsoft.UI.Xaml.Controls.h>
221+
#include <winrt/Microsoft.UI.Xaml.Navigation.h>
222222
using namespace winrt;
223223
using namespace winrt::Windows::Foundation;
224224
using namespace winrt::Windows::Storage;
225225
using namespace winrt::Windows::System;
226226
using namespace winrt::Windows::System::Power;
227-
using namespace winrt::Windows::UI::Xaml;
228-
using namespace winrt::Windows::UI::Xaml::Controls;
227+
using namespace winrt::Microsoft::UI::Xaml;
228+
using namespace winrt::Microsoft::UI::Xaml::Controls;
229229
using namespace winrt::Windows::UI::Xaml::Navigation;
230230
...
231231
winrt::fire_and_forget CheckForEnergySaving()
@@ -267,7 +267,7 @@ winrt::fire_and_forget CheckForEnergySaving()
267267
}
268268
```
269269

270-
This is the XAML for the [**ContentDialog**](/uwp/api/Windows.UI.Xaml.Controls.ContentDialog) featured in this example.
270+
This is the XAML for the [**ContentDialog**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.contentdialog) featured in this example.
271271

272272
```xaml
273273
<ContentDialog x:Name="saveEnergyDialog"

0 commit comments

Comments
 (0)