diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications.sln b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications.sln
new file mode 100644
index 000000000..e17ab380e
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications.sln
@@ -0,0 +1,57 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.2.32505.173
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "CppPackagedAppNotifications (Package)", "CppPackagedAppNotifications\CppPackagedAppNotifications (Package)\CppPackagedAppNotifications (Package).wapproj", "{DD0A6C40-D9D2-419C-85E1-D491A835DBB4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CppPackagedAppNotifications", "CppPackagedAppNotifications\CppPackagedAppNotifications\CppPackagedAppNotifications.vcxproj", "{8388B1E5-C891-4AF3-9380-4F89C7EB9690}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|arm64 = Debug|arm64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|arm64 = Release|arm64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|arm64.ActiveCfg = Debug|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|arm64.Build.0 = Debug|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|arm64.Deploy.0 = Debug|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x64.ActiveCfg = Debug|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x64.Build.0 = Debug|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x64.Deploy.0 = Debug|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x86.ActiveCfg = Debug|x86
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x86.Build.0 = Debug|x86
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Debug|x86.Deploy.0 = Debug|x86
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|arm64.ActiveCfg = Release|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|arm64.Build.0 = Release|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|arm64.Deploy.0 = Release|arm64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x64.ActiveCfg = Release|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x64.Build.0 = Release|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x64.Deploy.0 = Release|x64
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x86.ActiveCfg = Release|x86
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x86.Build.0 = Release|x86
+ {DD0A6C40-D9D2-419C-85E1-D491A835DBB4}.Release|x86.Deploy.0 = Release|x86
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|arm64.ActiveCfg = Debug|arm64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|arm64.Build.0 = Debug|arm64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|x64.ActiveCfg = Debug|x64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|x64.Build.0 = Debug|x64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|x86.ActiveCfg = Debug|Win32
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Debug|x86.Build.0 = Debug|Win32
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|arm64.ActiveCfg = Release|arm64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|arm64.Build.0 = Release|arm64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|x64.ActiveCfg = Release|x64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|x64.Build.0 = Release|x64
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|x86.ActiveCfg = Release|Win32
+ {8388B1E5-C891-4AF3-9380-4F89C7EB9690}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {D03F5394-3C2A-41D0-8FF2-E1797073B319}
+ EndGlobalSection
+EndGlobal
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/CppPackagedAppNotifications (Package).wapproj b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/CppPackagedAppNotifications (Package).wapproj
new file mode 100644
index 000000000..0a582f0f3
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/CppPackagedAppNotifications (Package).wapproj
@@ -0,0 +1,100 @@
+
+
+
+ 15.0
+
+
+
+ Debug
+ x86
+
+
+ Release
+ x86
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+ Debug
+ arm64
+
+
+ Release
+ arm64
+
+
+
+ $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\
+ NativeOnly
+ NativeOnly
+
+
+
+ dd0a6c40-d9d2-419c-85e1-d491a835dbb4
+ 10.0.22000.0
+ 10.0.17763.0
+ en-US
+ True
+ ..\CppPackagedAppNotifications\CppPackagedAppNotifications.vcxproj
+ ACA086B7A353F6C7E2CB72FEFC1DD02AD0048727
+ CppPackagedAppNotifications %28Package%29_TemporaryKey.pfx
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/LockScreenLogo.scale-200.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/LockScreenLogo.scale-200.png
new file mode 100644
index 000000000..7440f0d4b
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/LockScreenLogo.scale-200.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/SplashScreen.scale-200.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/SplashScreen.scale-200.png
new file mode 100644
index 000000000..32f486a86
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/SplashScreen.scale-200.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-100.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-100.png
new file mode 100644
index 000000000..4b3c7ed17
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-100.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-125.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-125.png
new file mode 100644
index 000000000..199f086d5
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-125.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-150.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-150.png
new file mode 100644
index 000000000..6c1b4257d
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-150.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-200.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-200.png
new file mode 100644
index 000000000..f4df75500
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-200.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-400.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-400.png
new file mode 100644
index 000000000..8a383b7f8
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square150x150Logo.scale-400.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 000000000..cd269127e
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 000000000..0973bc422
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 000000000..0d710c411
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 000000000..977199dc6
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 000000000..8865c9780
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 000000000..cd269127e
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 000000000..0d710c411
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 000000000..977199dc6
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 000000000..8865c9780
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-100.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-100.png
new file mode 100644
index 000000000..74208ccab
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-100.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-125.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-125.png
new file mode 100644
index 000000000..612c6eafe
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-125.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-150.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-150.png
new file mode 100644
index 000000000..77a191964
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-150.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-200.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-200.png
new file mode 100644
index 000000000..46762cd4b
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-200.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-400.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-400.png
new file mode 100644
index 000000000..71c2f252a
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.scale-400.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-16.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-16.png
new file mode 100644
index 000000000..cd269127e
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-16.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24.png
new file mode 100644
index 000000000..0973bc422
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 000000000..0973bc422
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-256.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-256.png
new file mode 100644
index 000000000..0d710c411
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-256.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-32.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-32.png
new file mode 100644
index 000000000..977199dc6
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-32.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-48.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-48.png
new file mode 100644
index 000000000..8865c9780
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Square44x44Logo.targetsize-48.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/StoreLogo.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/StoreLogo.png
new file mode 100644
index 000000000..a4586f26b
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/StoreLogo.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-100.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-100.png
new file mode 100644
index 000000000..781e2c557
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-100.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-125.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-125.png
new file mode 100644
index 000000000..88c781c9c
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-125.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-150.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-150.png
new file mode 100644
index 000000000..eb8c8ed79
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-150.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-200.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-200.png
new file mode 100644
index 000000000..e15a78d1b
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-200.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-400.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-400.png
new file mode 100644
index 000000000..11450e664
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Images/Wide310x150Logo.scale-400.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Package.appxmanifest b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Package.appxmanifest
new file mode 100644
index 000000000..e986a885b
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications (Package)/Package.appxmanifest
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+ CppPackagedAppNotifications (Package)
+ erlangl
+ Images\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml
new file mode 100644
index 000000000..c20f037c2
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.cpp b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.cpp
new file mode 100644
index 000000000..b34249ea0
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.cpp
@@ -0,0 +1,101 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#include "pch.h"
+#include "App.xaml.h"
+#include "MainWindow.xaml.h"
+#include "Notifications\NotificationManager.h"
+#include
+#include
+#include
+#include
+
+namespace winrt
+{
+ using namespace Windows::Foundation;
+ using namespace Microsoft::UI::Xaml;
+ using namespace winrt::Microsoft::Windows::AppLifecycle;
+ using namespace winrt::Microsoft::Windows::AppNotifications;
+}
+
+// NotificationManager is responsible for registering and unregistering the Sample for App Notifications as well as
+// dispatching actioned notifications to the appropriate scenario.
+// Registration will happen when Init() is called and Unregistration will happen when this
+// instance variable goes out of scope, i.e.: when the App is terminated.
+static NotificationManager g_notificationManager;
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ static App* app{ nullptr };
+
+ App::App()
+ {
+ InitializeComponent();
+ app = this;
+
+#if defined _DEBUG && !defined DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
+ UnhandledException([](winrt::IInspectable const&, winrt::UnhandledExceptionEventArgs const& e)
+ {
+ if (IsDebuggerPresent())
+ {
+ auto errorMessage = e.Message();
+ __debugbreak();
+ }
+ });
+#endif
+ }
+
+ void App::ToForeground()
+ {
+ assert(app != nullptr);
+
+ HWND hwnd;
+ auto windowNative{ app->window.as() };
+ if (windowNative && SUCCEEDED(windowNative->get_WindowHandle(&hwnd)))
+ {
+ SwitchToThisWindow(hwnd, TRUE);
+ }
+ }
+
+ std::wstring App::GetFullPathToExe()
+ {
+ TCHAR buffer[MAX_PATH] = { 0 };
+ GetModuleFileName(NULL, buffer, MAX_PATH);
+ std::wstring::size_type pos = std::wstring(buffer).find_last_of(L"\\/");
+ return std::wstring(buffer).substr(0, pos);
+ }
+
+ std::wstring App::GetFullPathToAsset(std::wstring const& assetName)
+ {
+ return GetFullPathToExe() + L"\\Images\\" + assetName;
+ }
+
+ void App::OnLaunched(winrt::Microsoft::UI::Xaml::LaunchActivatedEventArgs const& /*args*/)
+ {
+ window = make();
+
+ g_notificationManager.Init();
+
+ // NOTE: AppInstance is ambiguous between
+ // Microsoft.Windows.AppLifecycle.AppInstance and
+ // Windows.ApplicationModel.AppInstance
+ auto currentInstance{ winrt::AppInstance::GetCurrent() };
+ if (currentInstance)
+ {
+ // AppInstance.GetActivatedEventArgs will report the correct ActivationKind,
+ // even in WinUI's OnLaunched.
+ winrt::AppActivationArguments activationArgs{ currentInstance.GetActivatedEventArgs() };
+ if (activationArgs)
+ {
+ winrt::ExtendedActivationKind extendedKind{ activationArgs.Kind() };
+ if (extendedKind == winrt::Microsoft::Windows::AppLifecycle::ExtendedActivationKind::AppNotification)
+ {
+ winrt::AppNotificationActivatedEventArgs notificationActivatedEventArgs{ activationArgs.Data().as() };
+ g_notificationManager.ProcessLaunchActivationArgs(notificationActivatedEventArgs);
+ }
+ }
+ }
+
+ window.Activate();
+ }
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.h b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.h
new file mode 100644
index 000000000..e63693907
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/App.xaml.h
@@ -0,0 +1,23 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#pragma once
+#include "App.xaml.g.h"
+#include "pch.h"
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ struct App : AppT
+ {
+ App();
+
+ static std::wstring GetFullPathToExe();
+ static std::wstring GetFullPathToAsset(std::wstring const& assetName);
+ static void ToForeground();
+
+ void OnLaunched(Microsoft::UI::Xaml::LaunchActivatedEventArgs const&);
+
+ private:
+ Microsoft::UI::Xaml::Window window{ nullptr };
+ };
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/SplashScreen.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/SplashScreen.png
new file mode 100644
index 000000000..184821318
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/SplashScreen.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square150x150Logo.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square150x150Logo.png
new file mode 100644
index 000000000..a50c70379
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square150x150Logo.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square44x44Logo.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square44x44Logo.png
new file mode 100644
index 000000000..844b60c20
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Square44x44Logo.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Wide310x150Logo.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Wide310x150Logo.png
new file mode 100644
index 000000000..b5d5f2c42
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/Wide310x150Logo.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/logo.png b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/logo.png
new file mode 100644
index 000000000..fd2293e7b
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/logo.png differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/windows-sdk.ico b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/windows-sdk.ico
new file mode 100644
index 000000000..3ad20c7c2
Binary files /dev/null and b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Assets/windows-sdk.ico differ
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj
new file mode 100644
index 000000000..66d093339
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj
@@ -0,0 +1,235 @@
+
+
+
+
+
+
+ true
+ true
+ true
+ {8388b1e5-c891-4af3-9380-4f89c7eb9690}
+ CppPackagedAppNotifications
+ CppPackagedAppNotifications
+
+ $(RootNamespace)
+ en-US
+ 16.0
+ false
+ false
+ Windows Store
+ 10.0
+ 10.0
+ 10.0.17763.0
+ true
+ true
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Debug
+ arm64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+ Release
+ arm64
+
+
+
+ Application
+ v142
+ Unicode
+ true
+
+
+ true
+ true
+
+
+ false
+ true
+ false
+
+
+
+
+
+
+
+
+
+
+ Use
+ pch.h
+ $(IntDir)pch.pch
+ Level4
+ %(AdditionalOptions) /bigobj
+
+
+
+
+ _DEBUG;%(PreprocessorDefinitions)
+
+
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+
+
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+
+
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+
+
+
+
+ NDEBUG;%(PreprocessorDefinitions)
+
+
+ true
+ true
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+ onecore.lib;onecoreuap.lib;%(AdditionalDependencies)
+
+
+
+
+
+
+
+ MainPage.xaml
+ Code
+
+
+
+
+
+
+
+
+ App.xaml
+
+
+ MainWindow.xaml
+
+
+
+ Scenario1_ToastWithAvatar.xaml
+ Code
+
+
+ Scenario2_ToastWithTextBox.xaml
+ Code
+
+
+ SettingsPage.xaml
+ Code
+
+
+
+
+
+ Designer
+
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+ Designer
+
+
+
+
+ MainPage.xaml
+ Code
+
+
+
+
+
+
+
+ Create
+
+
+ App.xaml
+
+
+ MainWindow.xaml
+
+
+
+
+ Scenario1_ToastWithAvatar.xaml
+ Code
+
+
+ Scenario2_ToastWithTextBox.xaml
+ Code
+
+
+ SettingsPage.xaml
+ Code
+
+
+
+
+ Code
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj.filters b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj.filters
new file mode 100644
index 000000000..b7cb4a87d
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications.vcxproj.filters
@@ -0,0 +1,84 @@
+
+
+
+
+
+ Notifications
+
+
+ Notifications
+
+
+ Notifications
+
+
+ Notifications
+
+
+
+
+
+
+
+ {e48dc53e-40b1-40cb-970a-f89935452892}
+
+
+ {88af0e69-0f57-40f4-b16f-039a285b63b3}
+
+
+
+
+
+
+
+
+
+
+ Notifications
+
+
+ Notifications
+
+
+ Notifications
+
+
+ Notifications
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assets
+
+
+ Assets
+
+
+ Assets
+
+
+ Assets
+
+
+ Assets
+
+
+ Assets
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml
new file mode 100644
index 000000000..8a69235b9
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Received Notifications
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.cpp b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.cpp
new file mode 100644
index 000000000..d6d96bdb7
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.cpp
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#include "pch.h"
+#include "MainPage.xaml.h"
+#if __has_include("MainPage.g.cpp")
+#include "MainPage.g.cpp"
+#endif
+
+namespace winrt
+{
+ using namespace winrt::Windows::Foundation;
+ using namespace Microsoft::UI::Xaml;
+ using namespace Microsoft::UI::Xaml::Controls;
+ using namespace Microsoft::UI::Xaml::Media;
+ using namespace Microsoft::UI::Xaml::Media::Animation;
+ using namespace Microsoft::UI::Xaml::Navigation;
+ using namespace Windows::UI::Xaml::Interop;
+}
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ CppPackagedAppNotifications::MainPage MainPage::current{ nullptr };
+
+ MainPage::MainPage()
+ {
+ messages = winrt::single_threaded_observable_vector();
+
+ InitializeComponent();
+ MainPage::current = *this;
+ this->notificationBox().ItemsSource(messages);
+ }
+
+ void MainPage::NotificationReceived(Notification const& notification)
+ {
+ std::wstring text{ notification.Originator };
+
+ text.append(L"\t- Action: " + notification.Action);
+
+ if (notification.HasInput)
+ {
+ if (notification.Input.empty())
+ {
+ text.append(L"\t- No input received");
+ }
+ else
+ {
+ text.append(L"\t- Input received: " + notification.Input);
+ }
+ }
+ messages.InsertAt(0, PropertyValue::CreateString(text));
+ }
+
+ void MainPage::NotifyUser(hstring const& strMessage, InfoBarSeverity const& severity)
+ {
+ // If called from the UI thread, then update immediately.
+ // Otherwise, schedule a task on the UI thread to perform the update.
+ if (this->DispatcherQueue().HasThreadAccess())
+ {
+ UpdateStatus(strMessage, severity);
+ }
+ else
+ {
+ DispatcherQueue().TryEnqueue([strongThis = get_strong(), this, strMessage, severity]
+ { UpdateStatus(strMessage, severity); });
+ }
+ }
+
+ void MainPage::UpdateStatus(hstring const& strMessage, InfoBarSeverity severity)
+ {
+ infoBar().Message(strMessage);
+ infoBar().IsOpen(!strMessage.empty());
+ infoBar().Severity(severity);
+ }
+
+ void MainPage::NavView_Loaded(IInspectable const&, RoutedEventArgs const&)
+ {
+ for (auto&& s : Scenarios())
+ {
+ FontIcon fontIcon{};
+ fontIcon.FontFamily(winrt::FontFamily(L"Segoe MDL2 Assets"));
+ fontIcon.Glyph(L"\uE82D");
+
+ NavigationViewItem navViewItem{};
+ navViewItem.Content(box_value(s.Title));
+ navViewItem.Tag(box_value(s.ClassName));
+ navViewItem.Icon(fontIcon);
+ NavView().MenuItems().Append(navViewItem);
+ }
+
+ // NavView doesn't load any page by default, so load home page.
+ NavView().SelectedItem(NavView().MenuItems().GetAt(0));
+
+ // If navigation occurs on SelectionChanged, this isn't needed.
+ // Because we use ItemInvoked to navigate, we need to call Navigate
+ // here to load the home page.
+ if (Scenarios().Size() > 0)
+ {
+ NavView_Navigate(Scenarios().GetAt(0).ClassName, nullptr);
+ }
+ }
+
+
+ void MainPage::NavView_ItemInvoked(NavigationView const&, NavigationViewItemInvokedEventArgs const& args)
+ {
+ if (args.IsSettingsInvoked() == true)
+ {
+ hstring xamltypename = winrt::xaml_typename().Name;
+ NavView_Navigate(xamltypename, args.RecommendedNavigationTransitionInfo());
+ }
+ else if (args.InvokedItemContainer() != nullptr)
+ {
+ auto navItemTag = winrt::unbox_value(args.InvokedItemContainer().Tag());
+ if (navItemTag != L"")
+ {
+ NavView_Navigate(navItemTag, args.RecommendedNavigationTransitionInfo());
+ }
+ }
+ }
+
+ void MainPage::NavView_Navigate(hstring navItemTag, NavigationTransitionInfo const&)
+ {
+ TypeName pageType;
+
+ if (navItemTag == winrt::xaml_typename().Name)
+ {
+ pageType = winrt::xaml_typename();
+ }
+ else
+ {
+ pageType.Name = navItemTag;
+ pageType.Kind = TypeKind::Metadata;
+ }
+
+ NavView_NavigateToPage(pageType);
+ }
+
+ void MainPage::NavView_NavigateToPage(TypeName const& pageType)
+ {
+ // Get the page type before navigation so you can prevent duplicate
+ // entries in the backstack.
+ TypeName prePageType = ContentFrame().CurrentSourcePageType();
+
+ // Only navigate if the selected page isn't currently loaded.
+ if (prePageType.Name != pageType.Name)
+ {
+ DrillInNavigationTransitionInfo drillIn;
+ ContentFrame().Navigate(pageType, nullptr, drillIn);
+ }
+ }
+
+ void MainPage::NavView_BackRequested(NavigationView const&, NavigationViewBackRequestedEventArgs const&)
+ {
+ if (ContentFrame().CanGoBack())
+ {
+ ContentFrame().GoBack();
+ }
+ }
+
+ void MainPage::ContentFrame_Navigated(IInspectable const&, NavigationEventArgs const& e)
+ {
+ NavView().IsBackEnabled(ContentFrame().CanGoBack());
+
+ if (ContentFrame().SourcePageType().Name == winrt::xaml_typename().Name)
+ {
+ // SettingsItem is not part of NavView.MenuItems, and doesn't have a Tag.
+ NavView().SelectedItem((NavView().SettingsItem().as()));
+ NavView().Header(winrt::box_value(L"Settings"));
+ }
+ else
+ {
+ for (auto&& item : NavView().MenuItems())
+ {
+ auto navViewItem = item.try_as();
+ if (navViewItem != nullptr &&
+ winrt::unbox_value(navViewItem.Tag()) == e.SourcePageType().Name)
+ {
+ NavView().SelectedItem(navViewItem);
+ NavView().Header(navViewItem.Content());
+ break;
+ }
+ }
+ }
+ }
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.h b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.h
new file mode 100644
index 000000000..d9c99931f
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainPage.xaml.h
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#pragma once
+#include "MainPage.g.h"
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ struct MainPage : MainPageT
+ {
+ MainPage();
+ static CppPackagedAppNotifications::MainPage Current() { return current; }
+ static Windows::Foundation::Collections::IVector Scenarios() { return scenariosInner; }
+ void NotificationReceived(Notification const& notification);
+ void NotifyUser(hstring const& strMessage, Microsoft::UI::Xaml::Controls::InfoBarSeverity const& severity);
+ void UpdateStatus(hstring const& strMessage, Microsoft::UI::Xaml::Controls::InfoBarSeverity severity);
+ void NavView_Loaded(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::RoutedEventArgs const& e);
+ void NavView_ItemInvoked(Microsoft::UI::Xaml::Controls::NavigationView const& sender, Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs const& args);
+ void NavView_Navigate(hstring navItemTag, Microsoft::UI::Xaml::Media::Animation::NavigationTransitionInfo const& transitionInfo);
+ void NavView_BackRequested(Microsoft::UI::Xaml::Controls::NavigationView const& sender, Microsoft::UI::Xaml::Controls::NavigationViewBackRequestedEventArgs const& args);
+ void ContentFrame_Navigated(Windows::Foundation::IInspectable const& sender, Microsoft::UI::Xaml::Navigation::NavigationEventArgs const& e);
+
+ private:
+ static Windows::Foundation::Collections::IVector scenariosInner;
+ static CppPackagedAppNotifications::MainPage current;
+
+ void NavView_NavigateToPage(winrt::Windows::UI::Xaml::Interop::TypeName const& pageType);
+
+ Windows::Foundation::Collections::IVector messages;
+ };
+}
+
+namespace winrt::CppPackagedAppNotifications::factory_implementation
+{
+ struct MainPage : MainPageT
+ {
+ };
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml
new file mode 100644
index 000000000..88d5f98ce
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.cpp b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.cpp
new file mode 100644
index 000000000..234740d9c
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.cpp
@@ -0,0 +1,90 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#include "pch.h"
+#include "MainWindow.xaml.h"
+#include
+#if __has_include("MainWindow.g.cpp")
+#include "MainWindow.g.cpp"
+
+#include "microsoft.ui.xaml.window.h"
+#include "SampleConfiguration.h"
+#endif
+
+namespace winrt
+{
+ using namespace Microsoft::UI::Xaml;
+}
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ MainWindow::MainWindow()
+ {
+ InitializeComponent();
+
+ Title(winrt::CppPackagedAppNotifications::SampleConfig::FeatureName);
+
+ HWND hwnd = GetWindowHandle();
+ LoadIcon(hwnd, L"Assets/windows-sdk.ico");
+ SetWindowSize(hwnd, 1050, 800);
+ PlacementCenterWindowInMonitorWin32(hwnd);
+ }
+
+ HWND MainWindow::GetWindowHandle()
+ {
+ if (_hwnd == nullptr)
+ {
+ Window window = *this;
+ window.as()->get_WindowHandle(&_hwnd);
+ }
+ return _hwnd;
+ }
+
+ void MainWindow::LoadIcon(HWND hwnd, wchar_t const* iconPath)
+ {
+ HANDLE hSmallIcon = LoadImageW(nullptr, iconPath, IMAGE_ICON,
+ GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON),
+ LR_LOADFROMFILE | LR_SHARED);
+ SendMessageW(hwnd, WM_SETICON, ICON_SMALL, reinterpret_cast(hSmallIcon));
+
+ HANDLE hBigIcon = LoadImageW(nullptr, iconPath, IMAGE_ICON,
+ GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON),
+ LR_LOADFROMFILE | LR_SHARED);
+ SendMessageW(hwnd, WM_SETICON, ICON_BIG, reinterpret_cast(hBigIcon));
+ }
+
+ void MainWindow::SetWindowSize(HWND hwnd, int width, int height)
+ {
+ // Win32 uses pixels and WinUI 3 uses effective pixels, so you should apply the DPI scale factor
+ const UINT dpi = GetDpiForWindow(hwnd);
+ const float scalingFactor = static_cast(dpi) / 96;
+ const int widthScaled = static_cast(width * scalingFactor);
+ const int heightScaled = static_cast(height * scalingFactor);
+
+ SetWindowPos(hwnd, nullptr, 0, 0, widthScaled, heightScaled, SWP_NOMOVE | SWP_NOZORDER);
+ }
+
+ void MainWindow::PlacementCenterWindowInMonitorWin32(HWND hwnd)
+ {
+ RECT windowMontiorRectToAdjust;
+ GetWindowRect(hwnd, &windowMontiorRectToAdjust);
+ ClipOrCenterRectToMonitorWin32(windowMontiorRectToAdjust);
+ SetWindowPos(hwnd, nullptr, windowMontiorRectToAdjust.left,
+ windowMontiorRectToAdjust.top, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);
+ }
+
+ void MainWindow::ClipOrCenterRectToMonitorWin32(RECT& adjustedWindowRect)
+ {
+ MONITORINFO mi{ sizeof(mi) };
+ GetMonitorInfoW(MonitorFromRect(&adjustedWindowRect, MONITOR_DEFAULTTONEAREST), &mi);
+
+ const auto& rcWork = mi.rcWork;
+ const int w = adjustedWindowRect.right - adjustedWindowRect.left;
+ const int h = adjustedWindowRect.bottom - adjustedWindowRect.top;
+
+ adjustedWindowRect.left = rcWork.left + (rcWork.right - rcWork.left - w) / 2;
+ adjustedWindowRect.top = rcWork.top + (rcWork.bottom - rcWork.top - h) / 2;
+ adjustedWindowRect.right = adjustedWindowRect.left + w;
+ adjustedWindowRect.bottom = adjustedWindowRect.top + h;
+ }
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.h b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.h
new file mode 100644
index 000000000..967fcbf11
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/MainWindow.xaml.h
@@ -0,0 +1,29 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#pragma once
+#include "MainWindow.g.h"
+#include "pch.h"
+
+namespace winrt::CppPackagedAppNotifications::implementation
+{
+ struct MainWindow : MainWindowT
+ {
+ MainWindow();
+
+ private:
+ HWND _hwnd{ nullptr };
+ void SetWindowSize(HWND hwnd, const int width, const int height);
+ HWND GetWindowHandle();
+ void LoadIcon(HWND hwnd, wchar_t const* iconName);
+ void ClipOrCenterRectToMonitorWin32(RECT& rc);
+ void PlacementCenterWindowInMonitorWin32(HWND hwnd);
+ };
+}
+
+namespace winrt::CppPackagedAppNotifications::factory_implementation
+{
+ struct MainWindow : MainWindowT
+ {
+ };
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.cpp b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.cpp
new file mode 100644
index 000000000..11bda104f
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.cpp
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#include "pch.h"
+#include "Common.h"
+
+static auto scenarioTag{ L"scenarioId" };
+
+std::optional Common::ExtractParamFromArgs(std::wstring const& args, std::wstring const& paramName)
+{
+ auto tag{ paramName };
+ tag.append(L"=");
+
+ auto tagStart{ args.find(tag) };
+ if (tagStart == std::wstring::npos)
+ {
+ return std::nullopt;
+ }
+
+ auto paramStart{ tagStart + tag.length() };
+ auto paramEnd{ args.find(L"&", paramStart) };
+
+ return args.substr(paramStart, paramEnd - paramStart);
+}
+
+std::wstring Common::MakeScenarioIdToken(unsigned id)
+{
+ return std::wstring(scenarioTag) + L"=" + std::to_wstring(id);
+}
+
+std::optional Common::ExtractScenarioIdFromArgs(std::wstring const& args)
+{
+ auto scenarioId{ ExtractParamFromArgs(args, scenarioTag) };
+
+ if (!scenarioId.has_value())
+ {
+ return std::nullopt;
+ }
+
+ return std::stoul(scenarioId.value());
+}
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.h b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.h
new file mode 100644
index 000000000..84c9ec436
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/Common.h
@@ -0,0 +1,13 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#pragma once
+struct Common
+{
+public:
+ static std::optional ExtractParamFromArgs(std::wstring const& args, std::wstring const& paramName);
+
+ static std::wstring MakeScenarioIdToken(unsigned Id);
+ static std::optional ExtractScenarioIdFromArgs(std::wstring const& args);
+};
+
diff --git a/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/NotificationManager.cpp b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/NotificationManager.cpp
new file mode 100644
index 000000000..2ffbbddba
--- /dev/null
+++ b/Samples/Notifications/App/CppPackagedAppNotifications/CppPackagedAppNotifications/CppPackagedAppNotifications/Notifications/NotificationManager.cpp
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+
+#include "pch.h"
+#include "NotificationManager.h"
+#include "App.xaml.h"
+#include "MainPage.xaml.h"
+#include
+#include "ToastWithAvatar.h"
+#include "ToastWithTextBox.h"
+#include "Common.h"
+#include "NotifyUser.h"
+#include