Преглед на файлове

Add initial code for windows /WIP

Sebastián Katzer преди 8 години
родител
ревизия
ca759b41f6
променени са 100 файла, в които са добавени 4958 реда и са изтрити 1228 реда
  1. 4 0
      .gitignore
  2. 27 12
      plugin.xml
  3. 2 4
      src/android/ClearReceiver.java
  4. 2 4
      src/android/ClickActivity.java
  5. 3 5
      src/android/LocalNotification.java
  6. 2 4
      src/android/TriggerReceiver.java
  7. 2 4
      src/android/notification/AbstractClearReceiver.java
  8. 2 4
      src/android/notification/AbstractClickActivity.java
  9. 2 4
      src/android/notification/AbstractTriggerReceiver.java
  10. 2 4
      src/android/notification/AssetUtil.java
  11. 2 4
      src/android/notification/Builder.java
  12. 2 4
      src/android/notification/ClearReceiver.java
  13. 2 4
      src/android/notification/ClickActivity.java
  14. 2 4
      src/android/notification/Manager.java
  15. 2 4
      src/android/notification/Notification.java
  16. 2 4
      src/android/notification/Options.java
  17. 2 4
      src/android/notification/TriggerReceiver.java
  18. 4 0
      src/ios/APPLocalNotification.h
  19. 8 4
      src/ios/APPLocalNotification.m
  20. 4 0
      src/ios/APPNotificationContent.h
  21. 4 0
      src/ios/APPNotificationContent.m
  22. 4 0
      src/ios/APPNotificationOptions.h
  23. 4 0
      src/ios/APPNotificationOptions.m
  24. 4 0
      src/ios/UNNotificationRequest+APPLocalNotification.h
  25. 4 0
      src/ios/UNNotificationRequest+APPLocalNotification.m
  26. 4 0
      src/ios/UNUserNotificationCenter+APPLocalNotification.h
  27. 4 0
      src/ios/UNUserNotificationCenter+APPLocalNotification.m
  28. 0 437
      src/windows/LocalNotificationCore.js
  29. 62 271
      src/windows/LocalNotificationProxy.js
  30. BIN
      src/windows/LocalNotificationProxy/.vs/LocalNotificationProxy/v15/.suo
  31. 40 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy.sln
  32. 101 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Builder.cs
  33. 310 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Options.cs
  34. 54 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotificationProxy.cs
  35. 143 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotificationProxy.csproj
  36. 29 0
      src/windows/LocalNotificationProxy/LocalNotificationProxy/Properties/AssemblyInfo.cs
  37. 0 443
      src/windows/LocalNotificationUtil.js
  38. 46 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveGroup.cs
  39. 49 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveHelper.cs
  40. 89 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveImage.cs
  41. 72 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveImageEnums.cs
  42. 108 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBar.cs
  43. 43 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBarBindableProperty.cs
  44. 81 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBarValue.cs
  45. 85 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveSubgroup.cs
  46. 43 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveSubgroupEnums.cs
  47. 143 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveText.cs
  48. 28 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveTextBindableProperty.cs
  49. 173 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveTextEnums.cs
  50. 45 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseImageHelper.cs
  51. 28 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseTextHelper.cs
  52. 98 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BindableValues/BindableProgressBarValue.cs
  53. 78 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BindableValues/BindableString.cs
  54. 37 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveGroup.cs
  55. 67 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveImage.cs
  56. 32 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveImageEnums.cs
  57. 30 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveProgressBar.cs
  58. 67 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveSubgroup.cs
  59. 103 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveText.cs
  60. 22 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveChild.cs
  61. 22 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveSubgroupChild.cs
  62. 35 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IBaseImage.cs
  63. 30 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IBaseText.cs
  64. 104 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeGlyphContent.cs
  65. 86 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeGlyphValue.cs
  66. 86 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeNumericContent.cs
  67. 38 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/ArgumentValidator.cs
  68. 64 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/BaseElement.cs
  69. 36 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/EnumStringAttribute.cs
  70. 38 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/INotificationContent.cs
  71. 124 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/LimitedList{T}.cs
  72. 30 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationContentValidationException.cs
  73. 32 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlAttributeAttribute.cs
  74. 26 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlContentAttribute.cs
  75. 34 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlElementAttribute.cs
  76. 241 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/XmlWriterHelper.cs
  77. 57 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/GenerateNugetPackage.bat
  78. 114 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Microsoft.Toolkit.Uwp.Notifications.Shared.projitems
  79. 13 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Microsoft.Toolkit.Uwp.Notifications.Shared.shproj
  80. 20 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_Tile.cs
  81. 135 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_TileBinding.cs
  82. 47 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_TileVisual.cs
  83. 38 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/TileElementsCommon.cs
  84. 22 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/ITileBindingContentAdaptiveChild.cs
  85. 51 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentContact.cs
  86. 52 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentIconic.cs
  87. 43 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentPeople.cs
  88. 42 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentPhotos.cs
  89. 98 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBackgroundImage.cs
  90. 50 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBasicImage.cs
  91. 50 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBasicText.cs
  92. 173 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBinding.cs
  93. 80 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBindingContentAdaptive.cs
  94. 49 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBranding.cs
  95. 22 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileCommon.cs
  96. 65 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileContent.cs
  97. 60 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileImages.cs
  98. 99 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TilePeekImage.cs
  99. 40 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileSizeToAdaptiveTemplateConverter.cs
  100. 100 0
      src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileTemplateNameV3.cs

+ 4 - 0
.gitignore

@@ -0,0 +1,4 @@
+/src/windows.old
+/src/windows/**/.vs
+/src/windows/**/bin
+/src/windows/**/obj

+ 27 - 12
plugin.xml

@@ -1,5 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
+<!--
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apache License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://opensource.org/licenses/Apache-2.0/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+-->
+
 <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
         xmlns:android="http://schemas.android.com/apk/res/android"
         id="cordova-plugin-local-notifications"
@@ -198,24 +219,18 @@
     </platform> -->
 
     <!-- windows -->
-    <!-- <platform name="windows">
-
+    <platform name="windows">
         <config-file target="config.xml" parent="/*" >
             <preference name="WindowsToastCapable" value="true" />
         </config-file>
 
-        <js-module src="src/windows/LocalNotificationProxy.js" name="LocalNotification.Proxy" >
-            <merges target="" />
-        </js-module>
-
-        <js-module src="src/windows/LocalNotificationCore.js" name="LocalNotification.Proxy.Core" >
-            <merges target="" />
-        </js-module>
+        <framework src="src/windows/lib.UW/ARM/LocalNotificationProxy.winmd" target-dir="x86" arch="x86" custom="true"/>
+        <framework src="src/windows/lib.UW/ARM/LocalNotificationProxy.winmd" target-dir="x64" arch="x64" custom="true"/>
+        <framework src="src/windows/lib.UW/ARM/LocalNotificationProxy.winmd" target-dir="ARM" arch="ARM" custom="true"/>
 
-        <js-module src="src/windows/LocalNotificationUtil.js" name="LocalNotification.Proxy.Util" >
+        <js-module src="src/windows/LocalNotificationProxy.js" name="LocalNotification.Proxy" >
             <merges target="" />
         </js-module>
-
-    </platform> -->
+    </platform>
 
 </plugin>

+ 2 - 4
src/android/ClearReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.localnotification;

+ 2 - 4
src/android/ClickActivity.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.localnotification;

+ 3 - 5
src/android/LocalNotification.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.localnotification;
@@ -224,7 +222,7 @@ public class LocalNotification extends CordovaPlugin {
                 //silently ignore the exception
                 //on some samsung devices there is a known bug where a 500 alarms limit can crash the app
                 //http://developer.samsung.com/forum/board/thread/view.do?boardName=General&messageId=280286&listLines=15&startId=zzzzz%7E&searchSubId=0000000001
-                
+
             }
         }
     }

+ 2 - 4
src/android/TriggerReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.localnotification;

+ 2 - 4
src/android/notification/AbstractClearReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/AbstractClickActivity.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/AbstractTriggerReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/AssetUtil.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/Builder.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/ClearReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/ClickActivity.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/Manager.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/Notification.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/Options.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 2 - 4
src/android/notification/TriggerReceiver.java

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2013-2015 by appPlant UG. All rights reserved.
+ * Apache 2.0 License
  *
- * @APPPLANT_LICENSE_HEADER_START@
+ * Copyright (c) Sebastian Katzer 2017
  *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
@@ -17,8 +17,6 @@
  * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
  * Please see the License for the specific language governing rights and
  * limitations under the License.
- *
- * @APPPLANT_LICENSE_HEADER_END@
  */
 
 package de.appplant.cordova.plugin.notification;

+ 4 - 0
src/ios/APPLocalNotification.h

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 8 - 4
src/ios/APPLocalNotification.m

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in
@@ -612,11 +616,11 @@
     if (!deviceready && [event isEqualToString:@"click"]) {
         _launchDetails = @[notification.options.id, event];
     }
-    
+
     if (![event isEqualToString:@"clear"]) {
         [self fireEvent:@"clear" notification:notification];
     }
-    
+
     if ([response isKindOfClass:UNTextInputNotificationResponse.class]) {
         [data setObject:((UNTextInputNotificationResponse*) response).userText
                  forKey:@"text"];
@@ -710,13 +714,13 @@
         notiAsJSON = [request encodeToJSON];
         [data setObject:request.options.id forKey:@"notification"];
     }
-    
+
     dataAsData =
     [NSJSONSerialization dataWithJSONObject:data options:0 error:NULL];
 
     dataAsJSON =
     [[NSString alloc] initWithData:dataAsData encoding:NSUTF8StringEncoding];
-    
+
     if (request) {
         params = [NSString stringWithFormat:@"%@,%@", notiAsJSON, dataAsJSON];
     } else {

+ 4 - 0
src/ios/APPNotificationContent.h

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/APPNotificationContent.m

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/APPNotificationOptions.h

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/APPNotificationOptions.m

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/UNNotificationRequest+APPLocalNotification.h

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/UNNotificationRequest+APPLocalNotification.m

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/UNUserNotificationCenter+APPLocalNotification.h

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 4 - 0
src/ios/UNUserNotificationCenter+APPLocalNotification.m

@@ -1,4 +1,8 @@
 /*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
  * This file contains Original Code and/or Modifications of Original Code
  * as defined in and that are subject to the Apache License
  * Version 2.0 (the 'License'). You may not use this file except in

+ 0 - 437
src/windows/LocalNotificationCore.js

@@ -1,437 +0,0 @@
-/*
-    Copyright 2013-2015 appPlant UG
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-
-
-var proxy = require('de.appplant.cordova.plugin.local-notification.LocalNotification.Proxy');
-
-var Notifications = Windows.UI.Notifications;
-
-
-proxy.core = {
-
-    /**
-     * Executes all queued events.
-     */
-    deviceready: function () {
-        var plugin = cordova.plugins.notification.local,
-            events = this.eventQueue;
-
-        this.isReady = true;
-
-        for (var i = 0; i < events.length; i++) {
-            plugin.fireEvent.apply(plugin, events[i]);
-        }
-
-        this.eventQueue = [];
-    },
-
-    /**
-     * Schedules new local notifications.
-     *
-     * @param {Object[]} notifications
-     *      Array of local notifications
-     * @param {String} event
-     *      'schedule' or 'update'
-     */
-    schedule: function (notifications) {
-        var triggerFn = function (notification) {
-            this.updateBadge(notification.badge);
-            this.fireEvent('trigger', notification);
-        };
-
-        for (var i = 0; i < notifications.length; i++) {
-            var options = notifications[i],
-                notification = this.build(options);
-
-            this.cancelLocalNotification(options.id);
-            this.scheduleLocalNotification(notification, options);
-            this.scheduleBackupNotification(notification, options);
-            this.fireEvent('schedule', options);
-            this.callOnTrigger(options, triggerFn);
-        }
-    },
-
-    /**
-     * Schedules a single local notification.
-     *
-     * @param {Windows.Data.Xml.Dom.XmlDocument} notification
-     *      The local notification
-     * @param {Object} options
-     *      Local notification properties
-     */
-    scheduleLocalNotification: function (notification, options) {
-        var interval = this.getRepeatInterval(options.every),
-            triggerTime = new Date((options.at * 1000)),
-            now = new Date().getTime(),
-            toast;
-
-        if (triggerTime <= now) {
-            triggerTime = new Date(now + 10);
-        }
-
-        try {
-            if (interval !== 0 && interval < 360001 && interval > 59999) {
-                toast = new Notifications.ScheduledToastNotification(
-                    notification, triggerTime, interval, 5);
-            } else {
-                toast = new Notifications.ScheduledToastNotification(
-                    notification, triggerTime);
-            }
-        } catch (e) {
-            console.error(e);
-            return;
-        }
-
-        toast.id = options.id;
-        toast.tag = 'Toast' + toast.id;
-
-        this.getToastNotifier().addToSchedule(toast);
-    },
-
-    /**
-     * Schedules a backup local notification 10 years later.
-     *
-     * @param {Object} notification
-     *      The local notification
-     */
-    scheduleBackupNotification: function (notification, options) {
-        var properties = Object.create(options);
-
-        properties.id = options.id + '-2';
-        properties.at = options.at + 315360000; // 10 years later
-
-        this.scheduleLocalNotification(notification, properties);
-    },
-
-    /**
-     * Updates the badge number of the active tile.
-     *
-     * @param {Number} badge
-     *      The badge number. Zero will clean the badge.
-     */
-    updateBadge: function (badge) {
-        var notifications = Windows.UI.Notifications,
-            type = notifications.BadgeTemplateType.badgeNumber,
-            xml = notifications.BadgeUpdateManager.getTemplateContent(type),
-            attrs = xml.getElementsByTagName('badge'),
-            notification = new notifications.BadgeNotification(xml);
-
-        attrs[0].setAttribute('value', badge);
-
-        notifications.BadgeUpdateManager.createBadgeUpdaterForApplication()
-            .update(notification);
-    },
-
-    /**
-     * Updates existing notifications specified by IDs in options.
-     *
-     * @param {Object[]} notifications
-     *      Array of local notifications
-     */
-    update: function (notifications) {
-        for (var i = 0; i < notifications.length; i++) {
-            var updates = notifications[i],
-                options = getAll(updates.id || '0')[0];
-
-            this.updateLocalNotification(options, updates);
-            this.fireEvent('update', options);
-        }
-    },
-
-    /**
-     * Updates a single local notification.
-     *
-     * @param {Object} notification
-     *      The local notification
-     * @param {Object} updates
-     *      Updated properties
-     */
-    updateLocalNotification: function (notification, updates) {
-        for (var key in updates) {
-            notification[key] = updates[key];
-        }
-
-        this.cancelLocalNotification(notification.id);
-        this.scheduleLocalNotification(notification);
-    },
-
-    /**
-     * Clears the specified notifications.
-     *
-     * @param {int[]} ids
-     *      List of local notification IDs
-     */
-    clear: function (ids) {
-        for (var i = 0; i < ids.length; i++) {
-            var id = ids[i],
-                notification = this.getAll([id])[0];
-
-            this.clearLocalNotification(id);
-            this.fireEvent('clear', notification);
-        }
-    },
-
-    /**
-     * Clears the local notification with the given ID.
-     *
-     * @param {String} id
-     *      Local notification ID
-     */
-    clearLocalNotification: function (id) {
-        var notification = this.getAll([id])[0];
-
-        try {
-            this.getToastHistory().remove('Toast' + id);
-        } catch (e) {/*Only Phones support the NotificationHistory*/ }
-
-        if (this.isRepeating(notification))
-            return;
-
-        if (this.isTriggered(id) && !this.isScheduled(id)) {
-            this.cancelLocalNotification(id);
-        }
-    },
-
-    /**
-     * Clears all notifications.
-     */
-    clearAll: function () {
-        var ids = this.getTriggeredIds();
-
-        for (var i = 0; i < ids.length; i++) {
-            this.clearLocalNotification(ids[i]);
-        }
-
-        try {
-            this.getToastHistory().clear();
-        } catch (e) {/*Only Phones support the NotificationHistory*/ }
-        this.fireEvent('clearall');
-    },
-
-    /**
-     * Cancels all specified notifications.
-     *
-     * @param {int[]} ids
-     *      List of local notification IDs
-     */
-    cancel: function (ids) {
-        for (var i = 0; i < ids.length; i++) {
-            var id = ids[i],
-                notification = this.getAll([id])[0];
-
-            this.cancelLocalNotification(ids[i]);
-            this.fireEvent('cancel', notification);
-        }
-    },
-
-    /**
-     * Cancels the local notification with the given ID.
-     *
-     * @param {String} id
-     *      Local notification ID
-     */
-    cancelLocalNotification: function (id) {
-        var notifier = this.getToastNotifier(),
-            history = this.getToastHistory(),
-            toasts = this.getScheduledToasts();
-
-        try {
-            history.remove('Toast' + id);
-        } catch (e) {/*Only Phones support the NotificationHistory*/ }
-
-        for (var i = 0; i < toasts.length; i++) {
-            var toast = toasts[i];
-
-            if (toast.id == id || toast.id == id + '-2') {
-                notifier.removeFromSchedule(toast);
-            }
-        }
-    },
-
-    /**
-     * Cancels all notifications.
-     */
-    cancelAll: function () {
-        var ids = this.getAllIds();
-
-        for (var i = 0; i < ids.length; i++) {
-            this.cancelLocalNotification(ids[i]);
-        }
-
-        try {
-            this.getToastHistory().clear();
-        } catch (e) {/*Only Phones support the NotificationHistory*/ }
-        this.fireEvent('cancelall');
-    },
-
-    /**
-     * Checks if a notification with an ID is present.
-     *
-     * @param {int} id
-     *      Local notification ID
-     */
-    isPresent: function (id) {
-        return !!this.findToastById(id);
-    },
-
-    /**
-     * Checks if a notification with an ID was scheduled.
-     *
-     * @param {int} id
-     *      Local notification ID
-     */
-    isScheduled: function (id) {
-        var toast = this.findToastById(id);
-
-        return toast && this.isToastScheduled(toast);
-    },
-
-    /**
-     * Checks if a notification with an ID was triggered.
-     *
-     * @param {int} id
-     *      Local notification ID
-     */
-    isTriggered: function (id) {
-        var toast = this.findToastById(id);
-
-        return toast && this.isToastTriggered(toast);
-    },
-
-    /**
-     * Lists all local notification IDs.
-     */
-    getAllIds: function () {
-        var toasts = this.getScheduledToasts(),
-            ids = [];
-
-        for (var i = 0; i < toasts.length; i++) {
-            var toast   = toasts[i],
-                toastId = this.getToastId(toast);
-
-            if (ids.indexOf(toastId) == -1) {
-                ids.push(toastId);
-            }
-        }
-
-        return ids;
-    },
-
-    /**
-     * Lists all scheduled notification IDs.
-     */
-    getScheduledIds: function () {
-        var toasts = this.getScheduledToasts(),
-            ids = [];
-
-        for (var i = 0; i < toasts.length; i++) {
-            var toast = toasts[i];
-
-            if (!this.isToastScheduled(toast))
-                continue;
-
-            ids.push(this.getToastId(toast));
-        }
-
-        return ids;
-    },
-
-    /**
-     * Lists all scheduled notification IDs.
-     */
-    getTriggeredIds: function () {
-        var toasts = this.getScheduledToasts(),
-            ids = [];
-
-        for (var i = 0; i < toasts.length; i++) {
-            var toast = toasts[i];
-
-            if (!this.isToastTriggered(toast))
-                continue;
-
-            ids.push(this.getToastId(toast));
-        }
-
-        return ids;
-    },
-
-    /**
-     * Property list for given notifications.
-     * If called without IDs, all notification will be returned.
-     *
-     * @param {int[]} ids
-     *      List of local notification IDs.
-     * @param {String?} type
-     *      Local notification life cycle type
-     */
-    getAll: function (ids, type) {
-        var toasts = this.getScheduledToasts(),
-            notifications = [];
-
-        if (!ids || ids.length === 0) {
-            ids = this.getAllIds();
-        }
-
-        for (var index = 0; index < ids.length; index++) {
-            var id = ids[index],
-                toast = this.findToastById(id);
-
-            if (!toast || type && this.getToastType(toast) != type)
-                continue;
-
-            var json = toast.content.lastChild.lastChild.innerText;
-
-            notifications.push(JSON.parse(json));
-        }
-
-        return notifications;
-    },
-
-    /**
-     * Property list for given notifications.
-     * If called without IDs, all notification will be returned.
-     *
-     * @param {int[]} ids
-     *      List of local notification IDs
-     */
-    getScheduled: function (ids) {
-        if (!ids || ids.length === 0) {
-            ids = this.getAllIds();
-        }
-
-        return this.getAll(ids, 'scheduled');
-    },
-
-    /**
-     * Property list for given notifications.
-     * If called without IDs, all notification will be returned.
-     *
-     * @param {int[]} ids
-     *      List of local notification IDs
-     */
-    getTriggered: function (ids) {
-        if (!ids || ids.length === 0) {
-            ids = this.getAllIds();
-        }
-
-        return this.getAll(ids, 'triggered');
-    },
-};

+ 62 - 271
src/windows/LocalNotificationProxy.js

@@ -1,311 +1,102 @@
 /*
-    Copyright 2013-2015 appPlant UG
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-
-/**
- * Executes all queued events.
- */
-exports.deviceready  = function () {
-    exports.core.deviceready();
-};
-
-/**
- * Schedule a new local notification.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {Object[]} notifications
- *      Array of local notifications
- */
-exports.schedule = function (success, error, notifications) {
-    exports.core.schedule(notifications, 'schedule');
-
-    success();
-};
-
-/**
- * Update existing notifications specified by IDs in options.
+ * Apache 2.0 License
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {Object[]} notifications
- *      Array of local notifications
- */
-exports.update = function (success, error, notifications) {
-    exports.core.update(notifications);
-
-    success();
-};
-
-/**
- * Clear the specified notification.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.clear = function (success, error, ids) {
-    exports.core.clear(ids, true);
-
-    success();
-};
-
-/**
- * Clear all previously sheduled notifications.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- */
-exports.clearAll = function (success, error) {
-    exports.core.clearAll();
-
-    success();
-};
-
-/**
- * Cancel the specified notifications.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.cancel = function (success, error, ids) {
-    exports.core.cancel(ids, true);
-
-    success();
-};
-
-/**
- * Remove all previously registered notifications.
+ * Copyright (c) Sebastian Katzer 2017
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- */
-exports.cancelAll = function (success, error) {
-    exports.core.cancelAll();
-
-    success();
-};
-
-/**
- * Check if a notification with an ID is present.
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apache License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://opensource.org/licenses/Apache-2.0/ and read it before using this
+ * file.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int} id
- *      Local notification ID
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
  */
-exports.isPresent = function (success, error, args) {
-    var found = exports.core.isPresent(args[0]);
 
-    success(found);
-};
-
-/**
- * Check if a notification with an ID is scheduled.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int} id
- *      Local notification ID
- */
-exports.isScheduled = function (success, error, args) {
-    var found = exports.core.isScheduled(args[0]);
+var LocalNotification = LocalNotificationProxy.LocalNotification,
+    ActivationKind    = Windows.ApplicationModel.Activation.ActivationKind;
 
-    success(found);
-};
+var impl  = new LocalNotificationProxy.LocalNotificationProxy();
 
 /**
- * Check if a notification with an ID was triggered.
+ * Check permission to show notifications.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int} id
- *      Local notification ID
- */
-exports.isTriggered = function (success, error, args) {
-    var found = exports.core.isTriggered(args[0]);
-
-    success(found);
-};
-
-/**
- * List all local notification IDs.
+ * @param [ Function ] success Success callback
+ * @param [ Function ] error   Error callback
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
+ * @return [ Void ]
  */
-exports.getAllIds = function (success, error) {
-    var ids = exports.core.getAllIds();
+exports.check = function (success, error) {
+    var granted = impl.hasPermission();
 
-    success(ids);
+    success(granted);
 };
 
 /**
- * List all scheduled notification IDs.
+ * Request permission to show notifications.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- */
-exports.getScheduledIds = function (success, error) {
-    var ids = exports.core.getScheduledIds();
-
-    success(ids);
-};
-
-/**
- * List all triggered notification IDs.
+ * @param [ Function ] success Success callback
+ * @param [ Function ] error   Error callback
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
+ * @return [ Void ]
  */
-exports.getTriggeredIds = function (success, error) {
-    var ids = exports.core.getTriggeredIds();
-
-    success(ids);
+exports.request = function (success, error) {
+    exports.check(success, error);
 };
 
 /**
- * Propertys for given notification.
+ * Schedule notifications.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.getSingle = function (success, error, ids) {
-    var notification = exports.core.getAll(ids)[0];
-
-    success(notification);
-};
-
-/**
- * Propertys for given scheduled notification.
+ * @param [ Function ] success Success callback
+ * @param [ Function ] error   Error callback
+ * @param [ Array ]    args    Interface arguments
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
+ * @return [ Void ]
  */
-exports.getSingleScheduled = function (success, error, ids) {
-    var notification = exports.core.getScheduled(ids)[0];
+exports.schedule = function (success, error, args) {
+    var options = [];
 
-    success(notification);
-};
+    for (var i = 0, props, opts; i < args.length; i++) {
+        props = args[i];
+        opts  = new LocalNotification.Options();
 
-/**
- * Propertys for given triggered notification.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.getSingleTriggered = function (success, error, ids) {
-    var notification = exports.core.getTriggered(ids)[0];
+        for (var prop in opts) {
+            if (props[prop]) {
+                opts[prop] = props[prop];
+            }
+        }
 
-    success(notification);
-};
+        options.push(opts);
+    }
 
-/**
- * Property list for given notifications.
- * If called without IDs, all notification will be returned.
- *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.getAll = function (success, error, ids) {
-    var notifications = exports.core.getAll(ids);
+    impl.schedule(options);
 
-    success(notifications);
+    success();
 };
 
 /**
- * Property list for given triggered notifications.
- * If called without IDs, all notification will be returned.
+ * Inform the user through the click event that a notification was clicked.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
- */
-exports.getScheduled = function (success, error, ids) {
-    var notifications = exports.core.getScheduled(ids);
-
-    success(notifications);
-};
-
-/**
- * Property list for given triggered notifications.
- * If called without IDs, all notification will be returned.
+ * @param [ String ] xml The launch identifier.
  *
- * @param {Function} success
- *      Success callback
- * @param {Function} error
- *      Error callback
- * @param {int[]} ids
- *      List of local notification IDs
+ * @return [ Void ]
  */
-exports.getTriggered = function (success, error, ids) {
-    var notifications = exports.core.getTriggered(ids);
-
-    success(notifications);
+exports.clicked = function (xml) {
+    var notification = LocalNotification.Options.parse(xml);
+    cordova.plugins.notification.local.core.fireEvent('click', notification);
 };
 
+// Handle onclick event
+document.addEventListener('activated', function (e) {
+    if (e.kind == ActivationKind.toastNotification) {
+        exports.clicked(e.raw.argument);
+    }
+}, false);
 
 cordova.commandProxy.add('LocalNotification', exports);

BIN
src/windows/LocalNotificationProxy/.vs/LocalNotificationProxy/v15/.suo


+ 40 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy.sln

@@ -0,0 +1,40 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26430.14
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LocalNotificationProxy", "LocalNotificationProxy\LocalNotificationProxy.csproj", "{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|ARM = Debug|ARM
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|ARM = Release|ARM
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|ARM.ActiveCfg = Debug|ARM
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|ARM.Build.0 = Debug|ARM
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|x64.ActiveCfg = Debug|x64
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|x64.Build.0 = Debug|x64
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|x86.ActiveCfg = Debug|x86
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Debug|x86.Build.0 = Debug|x86
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|Any CPU.Build.0 = Release|Any CPU
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|ARM.ActiveCfg = Release|ARM
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|ARM.Build.0 = Release|ARM
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|x64.ActiveCfg = Release|x64
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|x64.Build.0 = Release|x64
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|x86.ActiveCfg = Release|x86
+		{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 101 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Builder.cs

@@ -0,0 +1,101 @@
+/*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apache License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://opensource.org/licenses/Apache-2.0/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ */
+
+namespace LocalNotificationProxy.LocalNotification
+{
+    using Microsoft.Toolkit.Uwp.Notifications;
+    using Windows.UI.Notifications;
+
+    internal class Builder
+    {
+        /// <summary>
+        /// Notification properties
+        /// </summary>
+        private Options options;
+
+        /// <summary>
+        /// Initializes a new instance of the <see cref="Builder"/> class.
+        /// </summary>
+        /// <param name="options">Notification properties to set.</param>
+        internal Builder(Options options)
+        {
+            this.options = options;
+        }
+
+        /// <summary>
+        /// Gets options
+        /// </summary>
+        public Options Options { get => this.options; }
+
+        /// <summary>
+        /// Build a toast notification specified by the options.
+        /// </summary>
+        /// <returns>A fully configured toast notification instance.</returns>
+        public ScheduledToastNotification Build()
+        {
+            var toast = new ToastContent()
+            {
+                Launch = this.Options.Identifier,
+                Audio = this.Options.ToastAudio,
+
+                Visual = new ToastVisual()
+                {
+                    BindingGeneric = new ToastBindingGeneric()
+                    {
+                        Children =
+                        {
+                            new AdaptiveText()
+                            {
+                                Text = this.Options.Title
+                            },
+
+                            new AdaptiveText()
+                            {
+                                Text = this.Options.Text
+                            }
+                        },
+
+                        AppLogoOverride = this.Options.ToastLogo
+                    }
+                }
+            };
+
+            var xml = toast.GetXml();
+            var at = this.Options.TriggerDate;
+            ScheduledToastNotification notification;
+
+            if (this.Options.IsRepeating())
+            {
+                var interval = this.Options.RepeatInterval;
+                notification = new ScheduledToastNotification(xml, at, interval, 5);
+            }
+            else
+            {
+                notification = new ScheduledToastNotification(xml, at);
+            }
+
+            notification.Id = this.Options.ID.ToString();
+            notification.Tag = notification.Id;
+
+            return notification;
+        }
+    }
+}

+ 310 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotification/Options.cs

@@ -0,0 +1,310 @@
+/*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apache License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://opensource.org/licenses/Apache-2.0/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ */
+
+namespace LocalNotificationProxy.LocalNotification
+{
+    using System;
+    using Microsoft.Toolkit.Uwp.Notifications;
+    using Windows.Data.Xml.Dom;
+
+    public sealed class Options
+    {
+
+        /// <summary>
+        /// Gets or sets notification ID.
+        /// </summary>
+        public int ID { get; set; }
+
+        /// <summary>
+        /// Gets or sets notification title.
+        /// </summary>
+        public string Title { get; set; }
+
+        /// <summary>
+        /// Gets or sets notification text.
+        /// </summary>
+        public string Text { get; set; }
+
+        /// <summary>
+        /// Gets or sets app badge number.
+        /// </summary>
+        public int Badge { get; set; }
+
+        /// <summary>
+        /// Gets or sets the notification sound.
+        /// </summary>
+        public string Sound { get; set; }
+
+        /// <summary>
+        /// Gets or sets the notification image.
+        /// </summary>
+        public string Image { get; set; }
+
+        /// <summary>
+        /// Gets or sets the notification fire date.
+        /// </summary>
+        public long At { get; set; }
+
+        /// <summary>
+        /// Gets or sets the notification repeat interval.
+        /// </summary>
+        public string Every { get; set; }
+
+        /// <summary>
+        /// Gets or sets the notification user data.
+        /// </summary>
+        public string Data { get; set; }
+
+        /// <summary>
+        /// Gets the date when to trigger the notification.
+        /// </summary>
+        internal DateTime TriggerDate
+        {
+            get
+            {
+                var date = DateTimeOffset.FromUnixTimeMilliseconds(this.At * 1000).LocalDateTime;
+                var minDate = DateTime.Now.AddSeconds(0.1);
+
+                return (date < minDate) ? minDate : date;
+            }
+        }
+
+        /// <summary>
+        /// Gets the parsed repeat interval.
+        /// </summary>
+        internal TimeSpan RepeatInterval
+        {
+            get
+            {
+                switch (this.Every)
+                {
+                    case "minute":
+                        return new TimeSpan(TimeSpan.TicksPerMinute);
+                    case "hour":
+                        return new TimeSpan(TimeSpan.TicksPerHour);
+                    case "day":
+                        return new TimeSpan(TimeSpan.TicksPerDay);
+                    default:
+                        return TimeSpan.Zero;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets a ToastAudio object based on the specified sound uri.
+        /// </summary>
+        internal ToastAudio ToastAudio
+        {
+            get
+            {
+                var sound = new ToastAudio();
+                string path = this.Sound;
+
+                if (path == null || path.Length == 0 || path.Equals("false"))
+                {
+                    sound.Silent = true;
+                }
+                else
+                if (path.StartsWith("file:///") || path.StartsWith("http"))
+                {
+                    sound.Src = new System.Uri(path, System.UriKind.Absolute);
+                }
+                else
+                if (path.StartsWith("file://"))
+                {
+                    sound.Src = new System.Uri(path.Replace("file:/", "ms-appx:///www"));
+                }
+                else
+                if (path.StartsWith("res://"))
+                {
+                    sound.Src = new System.Uri(path.Replace("res://", "ms-winsoundevent:notification."));
+                }
+                else
+                if (path.StartsWith("app://"))
+                {
+                    sound.Src = new System.Uri(path.Replace("app:/", "ms-appdata://"));
+                }
+
+                return sound;
+            }
+        }
+
+        /// <summary>
+        /// Gets a GenericAppLogo object based on the specified icon uri.
+        /// </summary>
+        internal ToastGenericAppLogo ToastLogo
+        {
+            get
+            {
+                var image = new ToastGenericAppLogo();
+                string path = this.Image;
+
+                if (path == null || path.StartsWith("res://logo"))
+                {
+                    image.Source = string.Empty;
+                }
+                else
+                if (path.StartsWith("file:///") || path.StartsWith("http"))
+                {
+                    image.Source = path;
+                }
+                else
+                if (path.StartsWith("file://"))
+                {
+                    image.Source = path.Replace("file:/", "ms-appx:///www");
+                }
+                else
+                if (path.StartsWith("res://"))
+                {
+                    image.Source = path.Replace("res://", "ms-appx:///images");
+                }
+                else
+                if (path.StartsWith("app://"))
+                {
+                    image.Source = path.Replace("app:/", "ms-appdata://local");
+                }
+                else
+                {
+                    image.Source = string.Empty;
+                }
+
+                if (image.Source.EndsWith("?crop=none"))
+                {
+                    image.HintCrop = ToastGenericAppLogoCrop.None;
+                }
+                else
+                if (image.Source.EndsWith("?crop=cirlce"))
+                {
+                    image.HintCrop = ToastGenericAppLogoCrop.Circle;
+                }
+
+                return image;
+            }
+        }
+
+        /// <summary>
+        /// Gets the instance as an serialized xml element.
+        /// </summary>
+        /// <returns>Element with all property values set as attributes.</returns>
+        internal string Identifier
+        {
+            get
+            {
+                var node = new XmlDocument().CreateElement("options");
+
+                node.SetAttribute("id", this.ID.ToString());
+                node.SetAttribute("badge", this.Badge.ToString());
+                node.SetAttribute("at", this.At.ToString());
+
+                if (this.Title != null)
+                {
+                    node.SetAttribute("title", this.Title);
+                }
+
+                if (this.Text != null)
+                {
+                    node.SetAttribute("text", this.Text);
+                }
+
+                if (this.Sound != null)
+                {
+                    node.SetAttribute("sound", this.Sound);
+                }
+
+                if (this.Image != null)
+                {
+                    node.SetAttribute("image", this.Image);
+                }
+
+                if (this.Every != null)
+                {
+                    node.SetAttribute("every", this.Every);
+                }
+
+                if (this.Data != null)
+                {
+                    node.SetAttribute("data", this.Data);
+                }
+
+                return node.GetXml();
+            }
+        }
+
+        /// <summary>
+        /// Deserializes the XML string into an instance of Options.
+        /// </summary>
+        /// <param name="identifier">The serialized instance of Options as an xml string.</param>
+        /// <returns>An instance where all properties have been assigned.</returns>
+        public static Options Parse(string identifier)
+        {
+            var doc = new XmlDocument();
+            doc.LoadXml(identifier);
+
+            var options = new Options();
+            var node = doc.DocumentElement;
+
+            options.ID = int.Parse(node.GetAttribute("id"));
+            options.Badge = int.Parse(node.GetAttribute("badge"));
+            options.At = int.Parse(node.GetAttribute("at"));
+
+            if (node.GetAttributeNode("text") != null)
+            {
+                options.Text = node.GetAttribute("text");
+            }
+
+            if (node.GetAttributeNode("title") != null)
+            {
+                options.Title = node.GetAttribute("title");
+            }
+
+            if (node.GetAttributeNode("sound") != null)
+            {
+                options.Sound = node.GetAttribute("sound");
+            }
+
+            if (node.GetAttributeNode("image") != null)
+            {
+                options.Image = node.GetAttribute("image");
+            }
+
+            if (node.GetAttributeNode("every") != null)
+            {
+                options.Every = node.GetAttribute("every");
+            }
+
+            if (node.GetAttributeNode("data") != null)
+            {
+                options.Data = node.GetAttribute("data");
+            }
+
+            return options;
+        }
+
+        /// <summary>
+        /// If the notification shall be repeating.
+        /// </summary>
+        /// <returns>True if the Every property has some value.</returns>
+        internal bool IsRepeating()
+        {
+            return this.Every != null && this.Every.Length > 0 && !this.Every.Equals("0");
+        }
+    }
+}

+ 54 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotificationProxy.cs

@@ -0,0 +1,54 @@
+/*
+ * Apache 2.0 License
+ *
+ * Copyright (c) Sebastian Katzer 2017
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the Apache License
+ * Version 2.0 (the 'License'). You may not use this file except in
+ * compliance with the License. Please obtain a copy of the License at
+ * http://opensource.org/licenses/Apache-2.0/ and read it before using this
+ * file.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ * Please see the License for the specific language governing rights and
+ * limitations under the License.
+ */
+
+namespace LocalNotificationProxy
+{
+    using System.Runtime.InteropServices.WindowsRuntime;
+    using LocalNotification;
+    using Windows.UI.Notifications;
+    using Windows.UI.WebUI;
+
+    public sealed class LocalNotificationProxy
+    {
+        /// <summary>
+        /// Check permission to schedule notifications.
+        /// </summary>
+        /// <returns>True if settings are enabled</returns>
+        public bool HasPermission()
+        {
+            NotificationSetting settings = ToastNotificationManager.CreateToastNotifier().Setting;
+            return settings == NotificationSetting.Enabled;
+        }
+
+        /// <summary>
+        /// Schedule notifications.
+        /// </summary>
+        /// <param name="notifications">List of key-value properties</param>
+        public void Schedule([ReadOnlyArray] Options[] notifications)
+        {
+            foreach (Options options in notifications)
+            {
+                ScheduledToastNotification notification = new Builder(options).Build();
+                ToastNotificationManager.CreateToastNotifier().AddToSchedule(notification);
+            }
+        }
+    }
+}

+ 143 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/LocalNotificationProxy.csproj

@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{F5B32CBA-8DAB-43E5-AE4F-98B3B1281FF1}</ProjectGuid>
+    <OutputType>winmdobj</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>LocalNotificationProxy</RootNamespace>
+    <AssemblyName>LocalNotificationProxy</AssemblyName>
+    <DefaultLanguage>de-DE</DefaultLanguage>
+    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
+    <TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.15063.0</TargetPlatformVersion>
+    <TargetPlatformMinVersion>10.0.15063.0</TargetPlatformMinVersion>
+    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <AllowCrossPlatformRetargeting>false</AllowCrossPlatformRetargeting>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
+    <PlatformTarget>x86</PlatformTarget>
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
+    <PlatformTarget>ARM</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\ARM\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>ARM</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+    <Optimize>false</Optimize>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
+    <PlatformTarget>ARM</PlatformTarget>
+    <OutputPath>bin\ARM\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>ARM</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+    <PlatformTarget>x64</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+    <PlatformTarget>x64</PlatformTarget>
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
+    <Optimize>true</Optimize>
+    <NoWarn>;2008</NoWarn>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup>
+    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="LocalNotificationProxy.cs" />
+    <Compile Include="LocalNotification\Builder.cs" />
+    <Compile Include="LocalNotification\Options.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <PackageReference Include="Microsoft.NETCore">
+      <Version>5.0.0</Version>
+    </PackageReference>
+    <PackageReference Include="Microsoft.NETCore.Portable.Compatibility">
+      <Version>1.0.1</Version>
+    </PackageReference>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.Notifications.UWP\Microsoft.Toolkit.Uwp.Notifications.UWP.csproj">
+      <Project>{fb381278-f4ad-4703-a12a-c43ee0b231bd}</Project>
+      <Name>Microsoft.Toolkit.Uwp.Notifications.UWP</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
+    <VisualStudioVersion>14.0</VisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+</Project>

+ 29 - 0
src/windows/LocalNotificationProxy/LocalNotificationProxy/Properties/AssemblyInfo.cs

@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("LocalNotificationProxy")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("LocalNotificationProxy")]
+[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers 
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: ComVisible(false)]

+ 0 - 443
src/windows/LocalNotificationUtil.js

@@ -1,443 +0,0 @@
-/*
-    Copyright 2013-2015 appPlant UG
-
-    Licensed to the Apache Software Foundation (ASF) under one
-    or more contributor license agreements.  See the NOTICE file
-    distributed with this work for additional information
-    regarding copyright ownership.  The ASF licenses this file
-    to you under the Apache License, Version 2.0 (the
-    "License"); you may not use this file except in compliance
-    with the License.  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing,
-    software distributed under the License is distributed on an
-    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-    KIND, either express or implied.  See the License for the
-    specific language governing permissions and limitations
-    under the License.
-*/
-
-
-exports = require('de.appplant.cordova.plugin.local-notification.LocalNotification.Proxy').core;
-
-var channel = require('cordova/channel');
-
-
-/***********
- * MEMBERS *
- ***********/
-
-// True if App is running, false if suspended
-exports.isInBackground = true;
-
-// Indicates if the device is ready (to receive events)
-exports.isReady = false;
-
-// Queues all events before deviceready
-exports.eventQueue = [];
-
-/********
- * UTIL *
- ********/
-
-/**
- * The repeating interval in milliseconds.
- *
- * @param {String} interval
- *      A number or a placeholder like `minute`.
- *
- * @return {Number}
- *      Interval in milliseconds
- */
-exports.getRepeatInterval = function (every) {
-
-    if (!every)
-        return 0;
-
-    if (every == 'minute')
-        return 60000;
-
-    if (every == 'hour')
-        return 360000;
-
-    if (!NaN(every))
-        return parseInt(every) * 60000;
-
-    return 0;
-};
-
-/**
- * If the notification is repeating.
- *
- * @param {Object} notification
- *      Local notification object
- *
- * @return Boolean
- */
-exports.isRepeating = function (notification) {
-    return this.getRepeatInterval(notification.every) !== 0;
-};
-
-/**
- * Parses sound file path.
- *
- * @param {String} path
- *      Relative path to sound resource
- *
- * @return {String} XML Tag for Sound-File
- */
-exports.parseSound = function (path) {
-	if (!path.match(/^file/))
-		return '';
-
-	var uri = this.parseUri(path),
-		audio = "<audio src=" + uri + " loop='false'/>";
-
-	return audio;
-};
-
-/**
- * Parses image file path.
- *
- * @param {String} path
- *      Relative path to image resource
- *
- * @return {String} XML-Tag for Image-File
- */
-exports.parseImage = function (path) {
-    if (!path.match(/^file/))
-        return '';
-
-    var uri = this.parseUri(path),
-        image = "<image id='1' src=" + uri + " />";
-
-    return image;
-};
-
-/**
- * Parses file path to URI.
- *
- * @param {String} path
- *      Relative path to a resource
- *
- * @return {String} URI to File
- */
-exports.parseUri = function (path) {
-    var pkg = Windows.ApplicationModel.Package.current,
-        pkgId = pkg.id,
-        pkgName = pkgId.name;
-
-	var uri = "'ms-appx://" + pkgName + "/www" + path.slice(6, path.length) + "'";
-
-	return uri;
-};
-
-/**
- * Builds the xml payload for a local notification based on its options.
- *
- * @param {Object} options
- *      Local notification properties
- *
- * @return Windows.Data.Xml.Dom.XmlDocument
- */
-exports.build = function (options) {
-    var template = this.buildToastTemplate(options),
-        notification = new Windows.Data.Xml.Dom.XmlDocument();
-
-    try {
-        notification.loadXml(template);
-    } catch (e) {
-        console.error(
-            'LocalNotification#schedule',
-            'Error loading the xml, check for invalid characters.');
-    }
-
-    // Launch Attribute to enable onClick event
-    var launchAttr = notification.createAttribute('launch'),
-        toastNode = notification.selectSingleNode('/toast');
-
-    launchAttr.value = options.id.toString();
-    toastNode.attributes.setNamedItem(launchAttr);
-
-    return notification;
-};
-
-/**
- * Builds the toast template with the right style depend on the options.
- *
- * @param {Object} options
- *      Local notification properties
- *
- * @return String
- */
-exports.buildToastTemplate = function (options) {
-	var title = options.title,
-		message = options.text || '',
-		json = JSON.stringify(options),
-		sound = '';
-
-	if (options.sound && options.sound !== '') {
-		sound = this.parseSound(options.sound);
-	}
-
-	var templateName = "ToastText",
-		imageNode;
-	if (options.icon && options.icon !== '') {
-		imageNode = this.parseImage(options.icon);
-		// template with Image
-		if (imageNode !== '') {
-			templateName = "ToastImageAndText";
-		}
-	} else {
-		imageNode = "";
-	}
-
-	var bindingNode;
-	if (title && title !== '') {
-		bindingNode = "<binding template='" + templateName + "02'>" +
-							imageNode +
-							"<text id='1'>" + title + "</text>" +
-							"<text id='2'>" + message + "</text>" +
-						"</binding>";
-	} else {
-		bindingNode = "<binding template='" + templateName + "01'>" +
-							imageNode +
-							"<text id='1'>" + message + "</text>" +
-						"</binding>";
-	}
-	return "<toast>" +
-				"<visual>" +
-						bindingNode +
-				"</visual>" +
-				sound +
-				"<json>" + json + "</json>" +
-			"</toast>";
-};
-
-/**
- * Short-hand method for the toast notification history.
- */
-exports.getToastHistory = function () {
-    return Windows.UI.Notifications.ToastNotificationManager.history;
-};
-
-/**
- * Gets a toast notifier instance.
- *
- * @return Object
- */
-exports.getToastNotifier = function () {
-    return Windows.UI.Notifications.ToastNotificationManager
-            .createToastNotifier();
-};
-
-/**
- * List of all scheduled toast notifiers.
- *
- * @return Array
- */
-exports.getScheduledToasts = function () {
-    return this.getToastNotifier().getScheduledToastNotifications();
-};
-
-/**
- * Gets the Id from the toast notifier.
- *
- * @param {Object} toast
- *      A toast notifier object
- *
- * @return String
- */
-exports.getToastId = function (toast) {
-    var id = toast.id;
-
-    if (id.match(/-2$/))
-        return id.match(/^[^-]+/)[0];
-
-    return id;
-};
-
-/**
- * Gets the notification life cycle type
- * (scheduled or triggered)
- *
- * @param {Object} toast
- *      A toast notifier object
- *
- * @return String
- */
-exports.getToastType = function (toast) {
-    return this.isToastTriggered(toast) ? 'triggered' : 'scheduled';
-};
-
-/**
- * If the toast is already scheduled.
- *
- * @param {Object} toast
- *      A toast notifier object
- *
- * @return Boolean
- */
-exports.isToastScheduled = function (toast) {
-    return !this.isToastTriggered(toast);
-};
-
-/**
- * If the toast is already triggered.
- *
- * @param {Object} toast
- *      A toast notifier object
- *
- * @return Boolean
- */
-exports.isToastTriggered = function (toast) {
-    var id = this.getToastId(toast),
-        notification = this.getAll([id])[0],
-        fireDate = new Date((notification.at) * 1000);
-
-    if (this.isRepeating(notification))
-        return false;
-
-    return fireDate <= new Date();
-};
-
-/**
- * Finds the toast by it's ID.
- *
- * @param {String} id
- *      Local notification ID
- *
- * @param Object
- */
-exports.findToastById = function (id) {
-    var toasts = this.getScheduledToasts();
-
-    for (var i = 0; i < toasts.length; i++) {
-        var toast = toasts[i];
-
-        if (this.getToastId(toast) == id)
-            return toast;
-    }
-
-    return null;
-};
-
-/**
- * Sets trigger event for local notification.
- *
- * @param {Object} notification
- *      Local notification object
- * @param {Function} callback
- *      Callback function
- */
-exports.callOnTrigger = function (notification, callback) {
-    var triggerTime = new Date((notification.at * 1000)),
-        interval = triggerTime - new Date();
-
-    if (interval <= 0) {
-        callback.call(this, notification);
-        return;
-    }
-
-    WinJS.Promise.timeout(interval).then(function () {
-        if (exports.isPresent(notification.id)) {
-            callback.call(exports, notification);
-        }
-    });
-};
-
-/**
- * Sets trigger event for all scheduled local notification.
- *
- * @param {Function} callback
- *      Callback function
- */
-exports.callOnTriggerForScheduled = function (callback) {
-    var notifications = this.getScheduled();
-
-    for (var i = 0; i < notifications.length; i++) {
-        this.callOnTrigger(notifications[i], callback);
-    }
-};
-
-/**
- * The application state - background or foreground.
- *
- * @return String
- */
-exports.getApplicationState = function () {
-    return this.isInBackground ? 'background' : 'foreground';
-};
-
-/**
- * Fires the event about a local notification.
- *
- * @param {String} event
- *      The event
- * @param {Object} notification
- *      The notification
- */
-exports.fireEvent = function (event, notification) {
-    var plugin = cordova.plugins.notification.local.core,
-        state = this.getApplicationState(),
-        args;
-
-    if (notification) {
-        args = [event, notification, state];
-    } else {
-        args = [event, state];
-    }
-
-    if (this.isReady && plugin) {
-        plugin.fireEvent.apply(plugin, args);
-    } else {
-        this.eventQueue.push(args);
-    }
-};
-
-
-/**************
- * LIFE CYCLE *
- **************/
-
-// Called before 'deviceready' event
-channel.onCordovaReady.subscribe(function () {
-    // Register trigger handler for each scheduled notification
-    exports.callOnTriggerForScheduled(function (notification) {
-        this.updateBadge(notification.badge);
-        this.fireEvent('trigger', notification);
-    });
-});
-
-// Handle onclick event
-document.addEventListener('activated', function (e) {
-    var id = e.args,
-        notification = exports.getAll([id])[0];
-
-    if (!notification)
-        return;
-
-    exports.clearLocalNotification(id);
-
-    var repeating = exports.isRepeating(notification);
-
-    exports.fireEvent('click', notification);
-    exports.fireEvent(repeating ? 'clear' : 'cancel', notification);
-}, false);
-
-// App is running in background
-document.addEventListener('pause', function () {
-    exports.isInBackground = true;
-}, false);
-
-// App is running in foreground
-document.addEventListener('resume', function () {
-    exports.isInBackground = false;
-}, false);
-
-// App is running in foreground
-document.addEventListener('deviceready', function () {
-    exports.isInBackground = false;
-}, false);

+ 46 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveGroup.cs

@@ -0,0 +1,46 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections.Generic;
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Groups semantically identify that the content in the group must either be displayed as a whole, or not displayed if it cannot fit. Groups also allow creating multiple columns. Supported on Tiles since RTM. Supported on Toasts since Anniversary Update.
+    /// </summary>
+    public sealed class AdaptiveGroup : ITileBindingContentAdaptiveChild, IAdaptiveChild, IToastBindingGenericChild
+    {
+        /// <summary>
+        /// The only valid children of groups are <see cref="AdaptiveSubgroup"/>. Each subgroup is displayed as a separate vertical column. Note that you must include at least one subgroup in your group, otherwise an <see cref="InvalidOperationException"/> will be thrown when you try to retrieve the XML for the notification.
+        /// </summary>
+        public IList<AdaptiveSubgroup> Children { get; private set; } = new List<AdaptiveSubgroup>();
+
+        internal Element_AdaptiveGroup ConvertToElement()
+        {
+            if (Children.Count == 0)
+            {
+                throw new InvalidOperationException("Groups must have at least one child subgroup. The Children property had zero items in it.");
+            }
+
+            Element_AdaptiveGroup group = new Element_AdaptiveGroup();
+
+            foreach (var subgroup in Children)
+            {
+                group.Children.Add(subgroup.ConvertToElement());
+            }
+
+            return group;
+        }
+    }
+}

+ 49 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveHelper.cs

@@ -0,0 +1,49 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive
+{
+    internal static class AdaptiveHelper
+    {
+        internal static object ConvertToElement(object obj)
+        {
+            if (obj is AdaptiveText)
+            {
+                return (obj as AdaptiveText).ConvertToElement();
+            }
+
+            if (obj is AdaptiveImage)
+            {
+                return (obj as AdaptiveImage).ConvertToElement();
+            }
+
+            if (obj is AdaptiveGroup)
+            {
+                return (obj as AdaptiveGroup).ConvertToElement();
+            }
+
+            if (obj is AdaptiveSubgroup)
+            {
+                return (obj as AdaptiveSubgroup).ConvertToElement();
+            }
+
+            if (obj is AdaptiveProgressBar)
+            {
+                return (obj as AdaptiveProgressBar).ConvertToElement();
+            }
+
+            throw new NotImplementedException("Unknown object: " + obj.GetType());
+        }
+    }
+}

+ 89 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveImage.cs

@@ -0,0 +1,89 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// An inline image.
+    /// </summary>
+    public sealed class AdaptiveImage
+        : IBaseImage,
+        IToastBindingGenericChild,
+        ITileBindingContentAdaptiveChild,
+        IAdaptiveChild,
+        IAdaptiveSubgroupChild
+    {
+        /// <summary>
+        /// Control the desired cropping of the image. Supported on Tiles since RTM. Supported on Toast since Anniversary Update.
+        /// </summary>
+        public AdaptiveImageCrop HintCrop { get; set; }
+
+        /// <summary>
+        /// By default, images have an 8px margin around them. You can remove this margin by setting this property to true. Supported on Tiles since RTM. Supported on Toast since Anniversary Update.
+        /// </summary>
+        public bool? HintRemoveMargin { get; set; }
+
+        /// <summary>
+        /// The horizontal alignment of the image. For Toast, this is only supported when inside an <see cref="AdaptiveSubgroup"/>.
+        /// </summary>
+        public AdaptiveImageAlign HintAlign { get; set; }
+
+        private string _source;
+
+        /// <summary>
+        /// Required. The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.
+        /// </summary>
+        public string Source
+        {
+            get { return _source; }
+            set { BaseImageHelper.SetSource(ref _source, value); }
+        }
+
+        /// <summary>
+        /// A description of the image, for users of assistive technologies.
+        /// </summary>
+        public string AlternateText { get; set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language.
+        /// </summary>
+        public bool? AddImageQuery { get; set; }
+
+        /// <summary>
+        /// Returns the image's source string.
+        /// </summary>
+        /// <returns>The image's source string.</returns>
+        public override string ToString()
+        {
+            if (Source == null)
+            {
+                return "Source is null";
+            }
+
+            return Source;
+        }
+
+        internal Element_AdaptiveImage ConvertToElement()
+        {
+            Element_AdaptiveImage image = BaseImageHelper.CreateBaseElement(this);
+
+            image.Crop = HintCrop;
+            image.RemoveMargin = HintRemoveMargin;
+            image.Align = HintAlign;
+            image.Placement = AdaptiveImagePlacement.Inline;
+
+            return image;
+        }
+    }
+}

+ 72 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveImageEnums.cs

@@ -0,0 +1,72 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Specifies the horizontal alignment for an image.
+    /// </summary>
+    public enum AdaptiveImageAlign
+    {
+        /// <summary>
+        /// Default value, alignment behavior determined by renderer.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Image stretches to fill available width (and potentially available height too, depending on where the image is).
+        /// </summary>
+        [EnumString("stretch")]
+        Stretch,
+
+        /// <summary>
+        /// Align the image to the left, displaying the image at its native resolution.
+        /// </summary>
+        [EnumString("left")]
+        Left,
+
+        /// <summary>
+        /// Align the image in the center horizontally, displaying the image at its native resolution.
+        /// </summary>
+        [EnumString("center")]
+        Center,
+
+        /// <summary>
+        /// Align the image to the right, displaying the image at its native resolution.
+        /// </summary>
+        [EnumString("right")]
+        Right
+    }
+
+    /// <summary>
+    /// Specify the desired cropping of the image.
+    /// </summary>
+    public enum AdaptiveImageCrop
+    {
+        /// <summary>
+        /// Default value, cropping behavior determined by renderer.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Image is not cropped.
+        /// </summary>
+        [EnumString("none")]
+        None,
+
+        /// <summary>
+        /// Image is cropped to a circle shape.
+        /// </summary>
+        [EnumString("circle")]
+        Circle
+    }
+}

+ 108 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBar.cs

@@ -0,0 +1,108 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+#if WINRT
+using System.Collections.Generic;
+#endif
+using System;
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// New in Creators Update: A progress bar. Only supported on toasts on Desktop, build 15007 or newer.
+    /// </summary>
+    public sealed class AdaptiveProgressBar : IToastBindingGenericChild
+    {
+#if WINRT
+        /// <summary>
+        /// Gets a dictionary of the current data bindings, where you can assign new bindings.
+        /// </summary>
+        public IDictionary<AdaptiveProgressBarBindableProperty, string> Bindings { get; private set; } = new Dictionary<AdaptiveProgressBarBindableProperty, string>();
+#endif
+
+        /// <summary>
+        /// Gets or sets an optional title string. Supports data binding.
+        /// </summary>
+        public
+#if WINRT
+            string
+#else
+            BindableString
+#endif
+            Title { get; set; }
+
+        /// <summary>
+        /// Gets or sets the value of the progress bar. Supports data binding. Defaults to 0.
+        /// </summary>
+        public
+#if WINRT
+            AdaptiveProgressBarValue
+#else
+            BindableProgressBarValue
+#endif
+            Value { get; set; } = AdaptiveProgressBarValue.FromValue(0);
+
+        /// <summary>
+        /// Gets or sets an optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.
+        /// </summary>
+        public
+#if WINRT
+            string
+#else
+            BindableString
+#endif
+            ValueStringOverride { get; set; }
+
+        /// <summary>
+        /// Required. Gets or sets a status string, which is displayed underneath the progress bar. This string should reflect the status of the operation, like "Downloading..." or "Installing..."
+        /// </summary>
+        public
+#if WINRT
+            string
+#else
+            BindableString
+#endif
+            Status { get; set; }
+
+        internal Element_AdaptiveProgressBar ConvertToElement()
+        {
+            // If Value not provided, we use 0
+            var val = Value;
+            if (val == null)
+            {
+                val = AdaptiveProgressBarValue.FromValue(0);
+            }
+
+            var answer = new Element_AdaptiveProgressBar();
+
+#if WINRT
+            answer.Title = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Title, Title);
+            answer.Value = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Value, val.ToXmlString());
+            answer.ValueStringOverride = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.ValueStringOverride, ValueStringOverride);
+            answer.Status = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveProgressBarBindableProperty.Status, Status);
+#else
+            answer.Title = Title?.ToXmlString();
+            answer.Value = val.ToXmlString();
+            answer.ValueStringOverride = ValueStringOverride?.ToXmlString();
+            answer.Status = Status?.ToXmlString();
+#endif
+
+            if (answer.Status == null)
+            {
+                throw new NullReferenceException("Status property is required.");
+            }
+
+            return answer;
+        }
+    }
+}

+ 43 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBarBindableProperty.cs

@@ -0,0 +1,43 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    // Note that this code is only compiled for WinRT. It is not compiled in any of the other projects.
+#if WINRT
+    /// <summary>
+    /// An enumeration of the properties that support data binding on <see cref="AdaptiveProgressBar"/> .
+    /// </summary>
+    public enum AdaptiveProgressBarBindableProperty
+    {
+        /// <summary>
+        /// An optional title string
+        /// </summary>
+        Title,
+
+        /// <summary>
+        /// The value of the progress bar.
+        /// </summary>
+        Value,
+
+        /// <summary>
+        /// An optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.
+        /// </summary>
+        ValueStringOverride,
+
+        /// <summary>
+        /// An optional status string, which is displayed underneath the progress bar. If provided, this string should reflect the status of the download, like "Downloading..." or "Installing...".
+        /// </summary>
+        Status
+    }
+#endif
+}

+ 81 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveProgressBarValue.cs

@@ -0,0 +1,81 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// A class that represents the progress bar's value.
+    /// </summary>
+    public sealed class AdaptiveProgressBarValue
+    {
+        /// <summary>
+        /// Gets or sets the value (0-1) representing the percent complete.
+        /// </summary>
+        public double Value { get; set; }
+
+        /// <summary>
+        /// Gets or sets whether the progress bar is indeterminate.
+        /// </summary>
+        public bool IsIndeterminate { get; set; }
+
+        /// <summary>
+        /// Private constructor
+        /// </summary>
+        private AdaptiveProgressBarValue()
+        {
+        }
+
+        internal string ToXmlString()
+        {
+            if (IsIndeterminate)
+            {
+                return "indeterminate";
+            }
+
+            return Value.ToString();
+        }
+
+        /// <summary>
+        /// Returns an indeterminate progress bar value.
+        /// </summary>
+        public static AdaptiveProgressBarValue Indeterminate
+        {
+            get
+            {
+                return new AdaptiveProgressBarValue()
+                {
+                    IsIndeterminate = true
+                };
+            }
+        }
+
+        /// <summary>
+        /// Returns a progress bar value using the specified value (0-1) representing the percent complete.
+        /// </summary>
+        /// <param name="d">The value, 0-1, inclusive.</param>
+        /// <returns>A progress bar value.</returns>
+        public static AdaptiveProgressBarValue FromValue(double d)
+        {
+            if (d < 0 || d > 1)
+            {
+                throw new ArgumentOutOfRangeException("d", "Value must be between 0 and 1, inclusive.");
+            }
+
+            return new AdaptiveProgressBarValue()
+            {
+                Value = d
+            };
+        }
+    }
+}

+ 85 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveSubgroup.cs

@@ -0,0 +1,85 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections.Generic;
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Subgroups are vertical columns that can contain text and images. Supported on Tiles since RTM. Supported on Toasts since Anniversary Update.
+    /// </summary>
+    public sealed class AdaptiveSubgroup
+    {
+        /// <summary>
+        /// <see cref="AdaptiveText"/> and <see cref="AdaptiveImage"/> are valid children of subgroups.
+        /// </summary>
+        public IList<IAdaptiveSubgroupChild> Children { get; private set; } = new List<IAdaptiveSubgroupChild>();
+
+        private int? _hintWeight;
+
+        /// <summary>
+        /// Control the width of this subgroup column by specifying the weight, relative to the other subgroups.
+        /// </summary>
+        public int? HintWeight
+        {
+            get
+            {
+                return _hintWeight;
+            }
+
+            set
+            {
+                Element_AdaptiveSubgroup.CheckWeight(value);
+
+                _hintWeight = value;
+            }
+        }
+
+        /// <summary>
+        /// Control the vertical alignment of this subgroup's content.
+        /// </summary>
+        public AdaptiveSubgroupTextStacking HintTextStacking { get; set; } = Element_AdaptiveSubgroup.DEFAULT_TEXT_STACKING;
+
+        internal Element_AdaptiveSubgroup ConvertToElement()
+        {
+            var subgroup = new Element_AdaptiveSubgroup()
+            {
+                Weight = HintWeight,
+                TextStacking = HintTextStacking
+            };
+
+            foreach (var child in Children)
+            {
+                subgroup.Children.Add(ConvertToSubgroupChildElement(child));
+            }
+
+            return subgroup;
+        }
+
+        private static IElement_AdaptiveSubgroupChild ConvertToSubgroupChildElement(IAdaptiveSubgroupChild child)
+        {
+            if (child is AdaptiveText)
+            {
+                return (child as AdaptiveText).ConvertToElement();
+            }
+
+            if (child is AdaptiveImage)
+            {
+                return (child as AdaptiveImage).ConvertToElement();
+            }
+
+            throw new NotImplementedException("Unknown child: " + child.GetType());
+        }
+    }
+}

+ 43 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveSubgroupEnums.cs

@@ -0,0 +1,43 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// TextStacking specifies the vertical alignment of content.
+    /// </summary>
+    public enum AdaptiveSubgroupTextStacking
+    {
+        /// <summary>
+        /// Renderer automatically selects the default vertical alignment.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Vertical align to the top.
+        /// </summary>
+        [EnumString("top")]
+        Top,
+
+        /// <summary>
+        /// Vertical align to the center.
+        /// </summary>
+        [EnumString("center")]
+        Center,
+
+        /// <summary>
+        /// Vertical align to the bottom.
+        /// </summary>
+        [EnumString("bottom")]
+        Bottom
+    }
+}

+ 143 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveText.cs

@@ -0,0 +1,143 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+#if WINRT
+using System.Collections.Generic;
+#endif
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// An adaptive text element.
+    /// </summary>
+    public sealed class AdaptiveText
+        : IAdaptiveChild,
+        IAdaptiveSubgroupChild,
+        ITileBindingContentAdaptiveChild,
+        IToastBindingGenericChild
+    {
+#if WINRT
+        /// <summary>
+        /// Gets a dictionary of the current data bindings, where you can assign new bindings.
+        /// </summary>
+        public IDictionary<AdaptiveTextBindableProperty, string> Bindings { get; private set; } = new Dictionary<AdaptiveTextBindableProperty, string>();
+#endif
+
+        /// <summary>
+        /// The text to display. Data binding support added in Creators Update, only works for toast top-level text elements.
+        /// </summary>
+        public
+#if WINRT
+            string
+#else
+            BindableString
+#endif
+            Text { get; set; }
+
+        /// <summary>
+        /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale, such as that in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string.
+        /// </summary>
+        public string Language { get; set; }
+
+        /// <summary>
+        /// The style controls the text's font size, weight, and opacity. Note that for Toast, the style will only take effect if the text is inside an <see cref="AdaptiveSubgroup"/>.
+        /// </summary>
+        public AdaptiveTextStyle HintStyle { get; set; }
+
+        /// <summary>
+        /// Set this to true to enable text wrapping. For Tiles, this is false by default. For Toasts, this is true on top-level text elements, and false inside an <see cref="AdaptiveSubgroup"/>. Note that for Toast, setting wrap will only take effect if the text is inside an <see cref="AdaptiveSubgroup"/> (you can use HintMaxLines = 1 to prevent top-level text elements from wrapping).
+        /// </summary>
+        public bool? HintWrap { get; set; }
+
+        private int? _hintMaxLines;
+
+        /// <summary>
+        /// The maximum number of lines the text element is allowed to display. For Tiles, this is infinity by default. For Toasts, top-level text elements will have varying max line amounts (and in the Anniversary Update you can change the max lines). Text on a Toast inside an <see cref="AdaptiveSubgroup"/> will behave identically to Tiles (default to infinity).
+        /// </summary>
+        public int? HintMaxLines
+        {
+            get
+            {
+                return _hintMaxLines;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    Element_AdaptiveText.CheckMaxLinesValue(value.Value);
+                }
+
+                _hintMaxLines = value;
+            }
+        }
+
+        private int? _hintMinLines;
+
+        /// <summary>
+        /// The minimum number of lines the text element must display. Note that for Toast, this property will only take effect if the text is inside an <see cref="AdaptiveSubgroup"/>.
+        /// </summary>
+        public int? HintMinLines
+        {
+            get
+            {
+                return _hintMinLines;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    Element_AdaptiveText.CheckMinLinesValue(value.Value);
+                }
+
+                _hintMinLines = value;
+            }
+        }
+
+        /// <summary>
+        /// The horizontal alignment of the text. Note that for Toast, this property will only take effect if the text is inside an <see cref="AdaptiveSubgroup"/>.
+        /// </summary>
+        public AdaptiveTextAlign HintAlign { get; set; }
+
+        internal Element_AdaptiveText ConvertToElement()
+        {
+            var answer = new Element_AdaptiveText()
+            {
+                Lang = Language,
+                Style = HintStyle,
+                Wrap = HintWrap,
+                MaxLines = HintMaxLines,
+                MinLines = HintMinLines,
+                Align = HintAlign
+            };
+
+#if WINRT
+            answer.Text = XmlWriterHelper.GetBindingOrAbsoluteXmlValue(Bindings, AdaptiveTextBindableProperty.Text, Text);
+#else
+            answer.Text = Text?.ToXmlString();
+#endif
+
+            return answer;
+        }
+
+        /// <summary>
+        /// Returns the value of the Text property.
+        /// </summary>
+        /// <returns>The value of the Text property.</returns>
+        public override string ToString()
+        {
+            return Text;
+        }
+    }
+}

+ 28 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveTextBindableProperty.cs

@@ -0,0 +1,28 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    // Note that this code is only compiled for WinRT. It is not compiled in any of the other projects.
+#if WINRT
+    /// <summary>
+    /// An enumeration of the properties that support data binding on <see cref="AdaptiveText"/> .
+    /// </summary>
+    public enum AdaptiveTextBindableProperty
+    {
+        /// <summary>
+        /// The text to display. Added in Creators Update only for toast top-level elements.
+        /// </summary>
+        Text
+    }
+#endif
+}

+ 173 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/AdaptiveTextEnums.cs

@@ -0,0 +1,173 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Text style controls font size, weight, and opacity.
+    /// </summary>
+    public enum AdaptiveTextStyle
+    {
+        /// <summary>
+        /// Style is determined by the renderer.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Default value. Paragraph font size, normal weight and opacity.
+        /// </summary>
+        [EnumString("caption")]
+        Caption,
+
+        /// <summary>
+        /// Same as Caption but with subtle opacity.
+        /// </summary>
+        [EnumString("captionSubtle")]
+        CaptionSubtle,
+
+        /// <summary>
+        /// H5 font size.
+        /// </summary>
+        [EnumString("body")]
+        Body,
+
+        /// <summary>
+        /// Same as Body but with subtle opacity.
+        /// </summary>
+        [EnumString("bodySubtle")]
+        BodySubtle,
+
+        /// <summary>
+        /// H5 font size, bold weight. Essentially the bold version of Body.
+        /// </summary>
+        [EnumString("base")]
+        Base,
+
+        /// <summary>
+        /// Same as Base but with subtle opacity.
+        /// </summary>
+        [EnumString("baseSubtle")]
+        BaseSubtle,
+
+        /// <summary>
+        /// H4 font size.
+        /// </summary>
+        [EnumString("subtitle")]
+        Subtitle,
+
+        /// <summary>
+        /// Same as Subtitle but with subtle opacity.
+        /// </summary>
+        [EnumString("subtitleSubtle")]
+        SubtitleSubtle,
+
+        /// <summary>
+        /// H3 font size.
+        /// </summary>
+        [EnumString("title")]
+        Title,
+
+        /// <summary>
+        /// Same as Title but with subtle opacity.
+        /// </summary>
+        [EnumString("titleSubtle")]
+        TitleSubtle,
+
+        /// <summary>
+        /// Same as Title but with top/bottom padding removed.
+        /// </summary>
+        [EnumString("titleNumeral")]
+        TitleNumeral,
+
+        /// <summary>
+        /// H2 font size.
+        /// </summary>
+        [EnumString("subheader")]
+        Subheader,
+
+        /// <summary>
+        /// Same as Subheader but with subtle opacity.
+        /// </summary>
+        [EnumString("subheaderSubtle")]
+        SubheaderSubtle,
+
+        /// <summary>
+        /// Same as Subheader but with top/bottom padding removed.
+        /// </summary>
+        [EnumString("subheaderNumeral")]
+        SubheaderNumeral,
+
+        /// <summary>
+        /// H1 font size.
+        /// </summary>
+        [EnumString("header")]
+        Header,
+
+        /// <summary>
+        /// Same as Header but with subtle opacity.
+        /// </summary>
+        [EnumString("headerSubtle")]
+        HeaderSubtle,
+
+        /// <summary>
+        /// Same as Header but with top/bottom padding removed.
+        /// </summary>
+        [EnumString("headerNumeral")]
+        HeaderNumeral
+    }
+
+    /// <summary>
+    /// Controls the horizontal alignment of text.
+    /// </summary>
+    public enum AdaptiveTextAlign
+    {
+        /// <summary>
+        /// Alignment is automatically determined by
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// The system automatically decides the alignment based on the language and culture.
+        /// </summary>
+        [EnumString("auto")]
+        Auto,
+
+        /// <summary>
+        /// Horizontally align the text to the left.
+        /// </summary>
+        [EnumString("left")]
+        Left,
+
+        /// <summary>
+        /// Horizontally align the text in the center.
+        /// </summary>
+        [EnumString("center")]
+        Center,
+
+        /// <summary>
+        /// Horizontally align the text to the right.
+        /// </summary>
+        [EnumString("right")]
+        Right
+    }
+
+    internal enum AdaptiveTextPlacement
+    {
+        /// <summary>
+        /// Default value
+        /// </summary>
+        Inline,
+
+        [EnumString("attribution")]
+        Attribution
+    }
+}

+ 45 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseImageHelper.cs

@@ -0,0 +1,45 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal static class BaseImageHelper
+    {
+        internal static void SetSource(ref string destination, string value)
+        {
+            if (value == null)
+            {
+                throw new ArgumentNullException(nameof(value));
+            }
+
+            destination = value;
+        }
+
+        internal static Element_AdaptiveImage CreateBaseElement(IBaseImage curr)
+        {
+            if (curr.Source == null)
+            {
+                throw new NullReferenceException("Source property is required.");
+            }
+
+            return new Element_AdaptiveImage()
+            {
+                Src = curr.Source,
+                Alt = curr.AlternateText,
+                AddImageQuery = curr.AddImageQuery
+            };
+        }
+    }
+}

+ 28 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BaseTextHelper.cs

@@ -0,0 +1,28 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal class BaseTextHelper
+    {
+        internal static Element_AdaptiveText CreateBaseElement(IBaseText curr)
+        {
+            return new Element_AdaptiveText()
+            {
+                Text = curr.Text,
+                Lang = curr.Language
+            };
+        }
+    }
+}

+ 98 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BindableValues/BindableProgressBarValue.cs

@@ -0,0 +1,98 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    // Note that this code is NOT compiled for WinRT.
+    // WinRT uses a different binding system since it doesn't support implicit type converters.
+#if !WINRT
+    /// <summary>
+    /// A binding value for doubles.
+    /// </summary>
+    public sealed class BindableProgressBarValue
+    {
+        /// <summary>
+        /// Raw value is used for the implicit converter case, where dev provided a raw double. We store the raw value,
+        /// so that later on when generating the XML, we can provide this value rather than binding syntax.
+        /// </summary>
+        internal AdaptiveProgressBarValue RawValue { get; private set; }
+
+        internal bool RawIsIndeterminate { get; private set; }
+
+        /// <summary>
+        /// The name that maps to your binding data value.
+        /// </summary>
+        public string BindingName { get; set; }
+
+        /// <summary>
+        /// Initializes a new binding for a double value, with the required binding value name. Do NOT include surrounding {} brackets.
+        /// </summary>
+        /// <param name="bindingName">The name that maps to your binding data value.</param>
+        public BindableProgressBarValue(string bindingName)
+        {
+            BindingName = bindingName;
+        }
+
+        /// <summary>
+        /// Private constructor used by the implicit converter to assign the raw value.
+        /// </summary>
+        private BindableProgressBarValue()
+        {
+        }
+
+        internal string ToXmlString()
+        {
+            if (BindingName != null)
+            {
+                return "{" + BindingName + "}";
+            }
+
+            if (RawValue != null)
+            {
+                return RawValue.ToXmlString();
+            }
+
+            return null;
+        }
+
+        /// <summary>
+        /// Creates a <see cref="BindableProgressBarValue"/> that has a raw value assigned.
+        /// </summary>
+        /// <param name="v">The raw value</param>
+        public static implicit operator BindableProgressBarValue(AdaptiveProgressBarValue v)
+        {
+            return new BindableProgressBarValue()
+            {
+                RawValue = v
+            };
+        }
+
+        /// <summary>
+        /// Returns the raw value of the <see cref="BindableProgressBarValue"/>.
+        /// </summary>
+        /// <param name="b">The <see cref="BindableProgressBarValue"/> to obtain the raw value from.</param>
+        public static implicit operator AdaptiveProgressBarValue(BindableProgressBarValue b)
+        {
+            return b.RawValue;
+        }
+
+        /// <summary>
+        /// Creates an <see cref="BindableProgressBarValue"/> that has tbe raw double value.
+        /// </summary>
+        /// <param name="d">The raw value</param>
+        public static implicit operator BindableProgressBarValue(double d)
+        {
+            return AdaptiveProgressBarValue.FromValue(d);
+        }
+    }
+#endif
+}

+ 78 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/BindableValues/BindableString.cs

@@ -0,0 +1,78 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    // Note that this code is NOT compiled for WinRT.
+    // WinRT uses a different binding system since it doesn't support implicit type converters.
+#if !WINRT
+    /// <summary>
+    /// A binding value for strings.
+    /// </summary>
+    public sealed class BindableString
+    {
+        internal string RawValue { get; private set; }
+
+        /// <summary>
+        /// The name that maps to your binding data value.
+        /// </summary>
+        public string BindingName { get; set; }
+
+        /// <summary>
+        /// Initializes a new binding for a string value, with the required binding name. Do NOT include surrounding {} brackets.
+        /// </summary>
+        /// <param name="bindingName">The name that maps to your data binding value.</param>
+        public BindableString(string bindingName)
+        {
+            BindingName = bindingName;
+        }
+
+        /// <summary>
+        /// Private constructor used by the implicit converter to assign the raw value.
+        /// </summary>
+        private BindableString()
+        {
+        }
+
+        internal string ToXmlString()
+        {
+            if (BindingName != null)
+            {
+                return "{" + BindingName + "}";
+            }
+
+            return RawValue;
+        }
+
+        /// <summary>
+        /// Creates a <see cref="BindableString"/> that has a raw value assigned.
+        /// </summary>
+        /// <param name="d">The raw value</param>
+        public static implicit operator BindableString(string d)
+        {
+            return new BindableString()
+            {
+                RawValue = d
+            };
+        }
+
+        /// <summary>
+        /// Returns the raw value of the <see cref="BindableString"/>.
+        /// </summary>
+        /// <param name="b">The <see cref="BindableString"/> to obtain the raw value from.</param>
+        public static implicit operator string(BindableString b)
+        {
+            return b.RawValue;
+        }
+    }
+#endif
+}

+ 37 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveGroup.cs

@@ -0,0 +1,37 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    [NotificationXmlElement("group")]
+    internal sealed class Element_AdaptiveGroup : IElement_TileBindingChild, IElement_ToastBindingChild, IElementWithDescendants
+    {
+        public IList<Element_AdaptiveSubgroup> Children { get; private set; } = new List<Element_AdaptiveSubgroup>();
+
+        public IEnumerable<object> Descendants()
+        {
+            foreach (Element_AdaptiveSubgroup subgroup in Children)
+            {
+                // Return the subgroup
+                yield return subgroup;
+
+                // And also return its descendants
+                foreach (object descendant in subgroup.Descendants())
+                {
+                    yield return descendant;
+                }
+            }
+        }
+    }
+}

+ 67 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveImage.cs

@@ -0,0 +1,67 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    [NotificationXmlElement("image")]
+    internal sealed class Element_AdaptiveImage : IElement_TileBindingChild, IElement_ToastBindingChild, IElement_AdaptiveSubgroupChild
+    {
+        internal const AdaptiveImagePlacement DEFAULT_PLACEMENT = AdaptiveImagePlacement.Inline;
+        internal const AdaptiveImageCrop DEFAULT_CROP = AdaptiveImageCrop.Default;
+        internal const AdaptiveImageAlign DEFAULT_ALIGN = AdaptiveImageAlign.Default;
+
+        [NotificationXmlAttribute("id")]
+        public int? Id { get; set; }
+
+        [NotificationXmlAttribute("src")]
+        public string Src { get; set; }
+
+        [NotificationXmlAttribute("alt")]
+        public string Alt { get; set; }
+
+        [NotificationXmlAttribute("addImageQuery")]
+        public bool? AddImageQuery { get; set; }
+
+        [NotificationXmlAttribute("placement", DEFAULT_PLACEMENT)]
+        public AdaptiveImagePlacement Placement { get; set; } = DEFAULT_PLACEMENT;
+
+        [NotificationXmlAttribute("hint-align", DEFAULT_ALIGN)]
+        public AdaptiveImageAlign Align { get; set; } = DEFAULT_ALIGN;
+
+        [NotificationXmlAttribute("hint-crop", DEFAULT_CROP)]
+        public AdaptiveImageCrop Crop { get; set; } = DEFAULT_CROP;
+
+        [NotificationXmlAttribute("hint-removeMargin")]
+        public bool? RemoveMargin { get; set; }
+
+        private int? _overlay;
+
+        [NotificationXmlAttribute("hint-overlay")]
+        public int? Overlay
+        {
+            get
+            {
+                return _overlay;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    Element_TileBinding.CheckOverlayValue(value.Value);
+                }
+
+                _overlay = value;
+            }
+        }
+    }
+}

+ 32 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveImageEnums.cs

@@ -0,0 +1,32 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    internal enum AdaptiveImagePlacement
+    {
+        [EnumString("inline")]
+        Inline,
+
+        [EnumString("background")]
+        Background,
+
+        [EnumString("peek")]
+        Peek,
+
+        [EnumString("hero")]
+        Hero,
+
+        [EnumString("appLogoOverride")]
+        AppLogoOverride
+    }
+}

+ 30 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveProgressBar.cs

@@ -0,0 +1,30 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    [NotificationXmlElement("progress")]
+    internal sealed class Element_AdaptiveProgressBar : IElement_ToastBindingChild
+    {
+        [NotificationXmlAttribute("value")]
+        public string Value { get; set; }
+
+        [NotificationXmlAttribute("title")]
+        public string Title { get; set; }
+
+        [NotificationXmlAttribute("valueStringOverride")]
+        public string ValueStringOverride { get; set; }
+
+        [NotificationXmlAttribute("status")]
+        public string Status { get; set; }
+    }
+}

+ 67 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveSubgroup.cs

@@ -0,0 +1,67 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    [NotificationXmlElement("subgroup")]
+    internal sealed class Element_AdaptiveSubgroup : IElementWithDescendants
+    {
+        internal const AdaptiveSubgroupTextStacking DEFAULT_TEXT_STACKING = AdaptiveSubgroupTextStacking.Default;
+
+        [NotificationXmlAttribute("hint-textStacking", DEFAULT_TEXT_STACKING)]
+        public AdaptiveSubgroupTextStacking TextStacking { get; set; } = DEFAULT_TEXT_STACKING;
+
+        private int? _weight;
+
+        [NotificationXmlAttribute("hint-weight")]
+        public int? Weight
+        {
+            get
+            {
+                return _weight;
+            }
+
+            set
+            {
+                CheckWeight(value);
+
+                _weight = value;
+            }
+        }
+
+        internal static void CheckWeight(int? weight)
+        {
+            if (weight != null && weight.Value < 1)
+            {
+                throw new ArgumentOutOfRangeException("Weight must be between 1 and int.MaxValue, inclusive (or null)");
+            }
+        }
+
+        public IList<IElement_AdaptiveSubgroupChild> Children { get; private set; } = new List<IElement_AdaptiveSubgroupChild>();
+
+        public IEnumerable<object> Descendants()
+        {
+            foreach (IElement_AdaptiveSubgroupChild child in Children)
+            {
+                // Return each child (we know there's no further descendants)
+                yield return child;
+            }
+        }
+    }
+
+    internal interface IElement_AdaptiveSubgroupChild
+    {
+    }
+}

+ 103 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/Elements/Element_AdaptiveText.cs

@@ -0,0 +1,103 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements
+{
+    [NotificationXmlElement("text")]
+    internal sealed class Element_AdaptiveText : IElement_TileBindingChild, IElement_AdaptiveSubgroupChild, IElement_ToastBindingChild
+    {
+        internal const AdaptiveTextStyle DEFAULT_STYLE = AdaptiveTextStyle.Default;
+        internal const AdaptiveTextAlign DEFAULT_ALIGN = AdaptiveTextAlign.Default;
+        internal const AdaptiveTextPlacement DEFAULT_PLACEMENT = AdaptiveTextPlacement.Inline;
+
+        [NotificationXmlContent]
+        public string Text { get; set; }
+
+        [NotificationXmlAttribute("id")]
+        public int? Id { get; set; }
+
+        [NotificationXmlAttribute("lang")]
+        public string Lang { get; set; }
+
+        [NotificationXmlAttribute("hint-align", DEFAULT_ALIGN)]
+        public AdaptiveTextAlign Align { get; set; } = DEFAULT_ALIGN;
+
+        private int? _maxLines;
+
+        [NotificationXmlAttribute("hint-maxLines")]
+        public int? MaxLines
+        {
+            get
+            {
+                return _maxLines;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    CheckMaxLinesValue(value.Value);
+                }
+
+                _maxLines = value;
+            }
+        }
+
+        internal static void CheckMaxLinesValue(int value)
+        {
+            if (value < 1)
+            {
+                throw new ArgumentOutOfRangeException("MaxLines must be between 1 and int.MaxValue, inclusive.");
+            }
+        }
+
+        private int? _minLines;
+
+        [NotificationXmlAttribute("hint-minLines")]
+        public int? MinLines
+        {
+            get
+            {
+                return _minLines;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    CheckMinLinesValue(value.Value);
+                }
+
+                _minLines = value;
+            }
+        }
+
+        internal static void CheckMinLinesValue(int value)
+        {
+            if (value < 1)
+            {
+                throw new ArgumentOutOfRangeException("MinLines must be between 1 and int.MaxValue, inclusive.");
+            }
+        }
+
+        [NotificationXmlAttribute("hint-style", DEFAULT_STYLE)]
+        public AdaptiveTextStyle Style { get; set; } = DEFAULT_STYLE;
+
+        [NotificationXmlAttribute("hint-wrap")]
+        public bool? Wrap { get; set; }
+
+        [NotificationXmlAttribute("placement", DEFAULT_PLACEMENT)]
+        public AdaptiveTextPlacement Placement { get; set; } = DEFAULT_PLACEMENT;
+    }
+}

+ 22 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveChild.cs

@@ -0,0 +1,22 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Elements that can be direct children of adaptive content, including (<see cref="AdaptiveText"/>, <see cref="AdaptiveImage"/>, and <see cref="AdaptiveGroup"/>).
+    /// </summary>
+    public interface IAdaptiveChild
+    {
+        // Blank interface simply for compile-enforcing the child types in the list.
+    }
+}

+ 22 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IAdaptiveSubgroupChild.cs

@@ -0,0 +1,22 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Elements that can be direct children of an <see cref="AdaptiveSubgroup"/>, including  (<see cref="AdaptiveText"/> and <see cref="AdaptiveImage"/>).
+    /// </summary>
+    public interface IAdaptiveSubgroupChild
+    {
+        // Blank interface simply for compile-enforcing the child types in the list.
+    }
+}

+ 35 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IBaseImage.cs

@@ -0,0 +1,35 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Contains the base properties that an image needs.
+    /// </summary>
+    public interface IBaseImage
+    {
+        /// <summary>
+        /// The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.
+        /// </summary>
+        string Source { get; set; }
+
+        /// <summary>
+        /// A description of the image, for users of assistive technologies.
+        /// </summary>
+        string AlternateText { get; set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language.
+        /// </summary>
+        bool? AddImageQuery { get; set; }
+    }
+}

+ 30 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Adaptive/IBaseText.cs

@@ -0,0 +1,30 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Defines the basic properties of a text element.
+    /// </summary>
+    public interface IBaseText
+    {
+        /// <summary>
+        /// The text to display.
+        /// </summary>
+        string Text { get; set; }
+
+        /// <summary>
+        /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale, such as that in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string.
+        /// </summary>
+        string Language { get; set; }
+    }
+}

+ 104 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeGlyphContent.cs

@@ -0,0 +1,104 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+#if WINDOWS_UWP
+using Windows.Data.Xml.Dom;
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Notification content object to display a glyph on a Tile's badge.
+    /// </summary>
+    public sealed class BadgeGlyphContent : INotificationContent
+    {
+        /// <summary>
+        /// Default constructor to create a glyph badge content object.
+        /// </summary>
+        public BadgeGlyphContent()
+        {
+        }
+
+        /// <summary>
+        /// Constructor to create a glyph badge content object with a glyph.
+        /// </summary>
+        /// <param name="glyph">The glyph to be displayed on the badge.</param>
+        public BadgeGlyphContent(BadgeGlyphValue glyph)
+        {
+            _glyph = glyph;
+        }
+
+        /// <summary>
+        /// The glyph to be displayed on the badge.
+        /// </summary>
+        public BadgeGlyphValue Glyph
+        {
+            get
+            {
+                return _glyph;
+            }
+
+            set
+            {
+                if (!Enum.IsDefined(typeof(BadgeGlyphValue), value))
+                {
+                    throw new ArgumentOutOfRangeException(nameof(value));
+                }
+
+                _glyph = value;
+            }
+        }
+
+        /// <summary>
+        /// Retrieves the notification Xml content as a string.
+        /// </summary>
+        /// <returns>The notification Xml content as a string.</returns>
+        public string GetContent()
+        {
+            if (!Enum.IsDefined(typeof(BadgeGlyphValue), _glyph))
+            {
+                throw new NotificationContentValidationException("The badge glyph property was left unset.");
+            }
+
+            string glyphString = _glyph.ToString();
+
+            // lower case the first character of the enum value to match the Xml schema
+            glyphString = string.Format("{0}{1}", char.ToLowerInvariant(glyphString[0]), glyphString.Substring(1));
+            return string.Format("<badge value='{0}'/>", glyphString);
+        }
+
+        /// <summary>
+        /// Retrieves the notification XML content as a string.
+        /// </summary>
+        /// <returns>The notification XML content as a string.</returns>
+        public override string ToString()
+        {
+            return GetContent();
+        }
+
+#if WINDOWS_UWP
+        /// <summary>
+        /// Retrieves the notification XML content as a WinRT Xml document.
+        /// </summary>
+        /// <returns>The notification XML content as a WinRT Xml document.</returns>
+        public XmlDocument GetXml()
+        {
+            XmlDocument xml = new XmlDocument();
+            xml.LoadXml(GetContent());
+            return xml;
+        }
+#endif
+
+        private BadgeGlyphValue _glyph = (BadgeGlyphValue)(-1);
+    }
+}

+ 86 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeGlyphValue.cs

@@ -0,0 +1,86 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// The types of glyphs that can be placed on a badge.
+    /// </summary>
+    public enum BadgeGlyphValue
+    {
+        /// <summary>
+        /// No glyph.  If there is a numeric badge, or a glyph currently on the badge,
+        /// it will be removed.
+        /// </summary>
+        None = 0,
+
+        /// <summary>
+        /// A glyph representing application activity.
+        /// </summary>
+        Activity,
+
+        /// <summary>
+        /// A glyph representing an alert.
+        /// </summary>
+        Alert,
+
+        /// <summary>
+        /// A glyph representing an alarm.
+        /// </summary>
+        Alarm,
+
+        /// <summary>
+        /// A glyph representing availability status.
+        /// </summary>
+        Available,
+
+        /// <summary>
+        /// A glyph representing away status
+        /// </summary>
+        Away,
+
+        /// <summary>
+        /// A glyph representing busy status.
+        /// </summary>
+        Busy,
+
+        /// <summary>
+        /// A glyph representing that a new message is available.
+        /// </summary>
+        NewMessage,
+
+        /// <summary>
+        /// A glyph representing that media is paused.
+        /// </summary>
+        Paused,
+
+        /// <summary>
+        /// A glyph representing that media is playing.
+        /// </summary>
+        Playing,
+
+        /// <summary>
+        /// A glyph representing unavailable status.
+        /// </summary>
+        Unavailable,
+
+        /// <summary>
+        /// A glyph representing an error.
+        /// </summary>
+        Error,
+
+        /// <summary>
+        /// A glyph representing attention status.
+        /// </summary>
+        Attention
+    }
+}

+ 86 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Badges/BadgeNumericContent.cs

@@ -0,0 +1,86 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+#if WINDOWS_UWP
+using Windows.Data.Xml.Dom;
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Notification content object to display a number on a Tile's badge.
+    /// </summary>
+    public sealed class BadgeNumericContent : INotificationContent
+    {
+        /// <summary>
+        /// Default constructor to create a numeric badge content object.
+        /// </summary>
+        public BadgeNumericContent()
+        {
+        }
+
+        /// <summary>
+        /// Constructor to create a numeric badge content object with a number.
+        /// </summary>
+        /// <param name="number">
+        /// The number that will appear on the badge.  If the number is 0, the badge
+        /// will be removed.
+        /// </param>
+        public BadgeNumericContent(uint number)
+        {
+            _number = number;
+        }
+
+        /// <summary>
+        /// The number that will appear on the badge.  If the number is 0, the badge
+        /// will be removed.
+        /// </summary>
+        public uint Number
+        {
+            get { return _number; }
+            set { _number = value; }
+        }
+
+        /// <summary>
+        /// Retrieves the notification Xml content as a string.
+        /// </summary>
+        /// <returns>The notification Xml content as a string.</returns>
+        public string GetContent()
+        {
+            return string.Format("<badge value='{0}'/>", _number);
+        }
+
+        /// <summary>
+        /// Retrieves the notification Xml content as a string.
+        /// </summary>
+        /// <returns>The notification Xml content as a string.</returns>
+        public override string ToString()
+        {
+            return GetContent();
+        }
+
+#if WINDOWS_UWP
+    /// <summary>
+    /// Retrieves the notification Xml content as a WinRT Xml document.
+    /// </summary>
+    /// <returns>The notification Xml content as a WinRT Xml document.</returns>
+        public XmlDocument GetXml()
+        {
+            XmlDocument xml = new XmlDocument();
+            xml.LoadXml(GetContent());
+            return xml;
+        }
+#endif
+
+        private uint _number = 0;
+    }
+}

+ 38 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/ArgumentValidator.cs

@@ -0,0 +1,38 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal static class ArgumentValidator
+    {
+        public static void SetProperty<T>(ref T property, T value, string propertyName, ArgumentValidatorOptions options)
+        {
+            if (options.HasFlag(ArgumentValidatorOptions.NotNull))
+            {
+                if (value == null)
+                {
+                    throw new ArgumentNullException(propertyName);
+                }
+            }
+
+            property = value;
+        }
+    }
+
+    [Flags]
+    internal enum ArgumentValidatorOptions
+    {
+        NotNull
+    }
+}

+ 64 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/BaseElement.cs

@@ -0,0 +1,64 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System.IO;
+using System.Text;
+
+#if WINDOWS_UWP
+using Windows.Data.Xml.Dom;
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal abstract class BaseElement
+    {
+        /// <summary>
+        /// Retrieves the notification XML content as a string.
+        /// </summary>
+        /// <returns>The notification XML content as a string.</returns>
+        public string GetContent()
+        {
+            using (MemoryStream stream = new MemoryStream())
+            {
+                using (System.Xml.XmlWriter writer = System.Xml.XmlWriter.Create(stream, new System.Xml.XmlWriterSettings()
+                {
+                    Encoding = Encoding.UTF8, // Use UTF-8 encoding to save space (it defaults to UTF-16 which is 2x the size)
+                    Indent = false,
+                    NewLineOnAttributes = false
+                }))
+                {
+                    XmlWriterHelper.Write(writer, this);
+                }
+
+                stream.Position = 0;
+
+                using (StreamReader reader = new StreamReader(stream))
+                {
+                    return reader.ReadToEnd();
+                }
+            }
+        }
+
+#if WINDOWS_UWP
+        /// <summary>
+        /// Retrieves the notification XML content as a WinRT XML document.
+        /// </summary>
+        /// <returns>The notification XML content as a WinRT XML document.</returns>
+        public XmlDocument GetXml()
+        {
+            XmlDocument xml = new XmlDocument();
+            xml.LoadXml(GetContent());
+            return xml;
+        }
+#endif
+    }
+}

+ 36 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/EnumStringAttribute.cs

@@ -0,0 +1,36 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal sealed class EnumStringAttribute : Attribute
+    {
+        public string String { get; }
+
+        public EnumStringAttribute(string s)
+        {
+            if (s == null)
+            {
+                throw new ArgumentNullException(nameof(s));
+            }
+
+            String = s;
+        }
+
+        public override string ToString()
+        {
+            return String;
+        }
+    }
+}

+ 38 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/INotificationContent.cs

@@ -0,0 +1,38 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+#if WINDOWS_UWP
+using Windows.Data.Xml.Dom;
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Base notification content interface to retrieve notification Xml as a string.
+    /// </summary>
+    public interface INotificationContent
+    {
+        /// <summary>
+        /// Retrieves the notification Xml content as a string.
+        /// </summary>
+        /// <returns>The notification Xml content as a string.</returns>
+        string GetContent();
+
+#if WINDOWS_UWP
+        /// <summary>
+        /// Retrieves the notification Xml content as a WinRT Xml document.
+        /// </summary>
+        /// <returns>The notification Xml content as a WinRT Xml document.</returns>
+        XmlDocument GetXml();
+#endif
+    }
+}

+ 124 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/LimitedList{T}.cs

@@ -0,0 +1,124 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal sealed class LimitedList<T> : IList<T>
+    {
+        private List<T> _list;
+
+        public int Limit { get; private set; }
+
+        public LimitedList(int limit)
+        {
+            _list = new List<T>(limit);
+
+            Limit = limit;
+        }
+
+        public T this[int index]
+        {
+            get
+            {
+                return _list[index];
+            }
+
+            set
+            {
+                _list[index] = value;
+            }
+        }
+
+        public int Count
+        {
+            get
+            {
+                return _list.Count;
+            }
+        }
+
+        public bool IsReadOnly
+        {
+            get
+            {
+                return false;
+            }
+        }
+
+        public void Add(T item)
+        {
+            if (_list.Count >= Limit)
+            {
+                throw new Exception("This list is limited to " + Limit + " items. You cannot add more items.");
+            }
+
+            _list.Add(item);
+        }
+
+        public void Clear()
+        {
+            _list.Clear();
+        }
+
+        public bool Contains(T item)
+        {
+            return _list.Contains(item);
+        }
+
+        public void CopyTo(T[] array, int arrayIndex)
+        {
+            _list.CopyTo(array, arrayIndex);
+        }
+
+        public IEnumerator<T> GetEnumerator()
+        {
+            return _list.GetEnumerator();
+        }
+
+        public int IndexOf(T item)
+        {
+            return _list.IndexOf(item);
+        }
+
+        public void Insert(int index, T item)
+        {
+            _list.Insert(index, item);
+        }
+
+        public bool Remove(T item)
+        {
+            return _list.Remove(item);
+        }
+
+        public void RemoveAt(int index)
+        {
+            _list.RemoveAt(index);
+        }
+
+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return GetEnumerator();
+        }
+    }
+
+    internal interface IElementWithDescendants
+    {
+        IEnumerable<object> Descendants();
+    }
+}

+ 30 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationContentValidationException.cs

@@ -0,0 +1,30 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Exception returned when invalid notification content is provided.
+    /// </summary>
+    internal sealed class NotificationContentValidationException : Exception
+    {
+        public NotificationContentValidationException(string message)
+            : base(message)
+        {
+        }
+    }
+}

+ 32 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlAttributeAttribute.cs

@@ -0,0 +1,32 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal sealed class NotificationXmlAttributeAttribute : Attribute
+    {
+        public string Name { get; private set; }
+
+        public object DefaultValue { get; private set; }
+
+        public NotificationXmlAttributeAttribute(string name, object defaultValue = null)
+        {
+            Name = name;
+            DefaultValue = defaultValue;
+        }
+    }
+}

+ 26 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlContentAttribute.cs

@@ -0,0 +1,26 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// This attribute should be specified at most one time on an Element class. The property's value will be written as a string in the element's body.
+    /// </summary>
+    internal sealed class NotificationXmlContentAttribute : Attribute
+    {
+    }
+}

+ 34 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/NotificationXmlElementAttribute.cs

@@ -0,0 +1,34 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal sealed class NotificationXmlElementAttribute : Attribute
+    {
+        public string Name { get; private set; }
+
+        public NotificationXmlElementAttribute(string name)
+        {
+            if (string.IsNullOrWhiteSpace(name))
+            {
+                throw new ArgumentNullException("name cannot be null or whitespace");
+            }
+
+            Name = name;
+        }
+    }
+}

+ 241 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Common/XmlWriterHelper.cs

@@ -0,0 +1,241 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+#if WINDOWS_UWP
+
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal static class XmlWriterHelper
+    {
+        public static void Write(System.Xml.XmlWriter writer, object element)
+        {
+            NotificationXmlElementAttribute elAttr = GetElementAttribute(element.GetType());
+
+            // If it isn't an element attribute, don't write anything
+            if (elAttr == null)
+            {
+                return;
+            }
+
+            writer.WriteStartElement(elAttr.Name);
+
+            IEnumerable<PropertyInfo> properties = GetProperties(element.GetType());
+
+            List<object> elements = new List<object>();
+            object content = null;
+
+            // Write the attributes first
+            foreach (PropertyInfo p in properties)
+            {
+                IEnumerable<Attribute> attributes = GetCustomAttributes(p);
+
+                NotificationXmlAttributeAttribute attr = attributes.OfType<NotificationXmlAttributeAttribute>().FirstOrDefault();
+
+                object propertyValue = GetPropertyValue(p, element);
+
+                // If it's an attribute
+                if (attr != null)
+                {
+                    object defaultValue = attr.DefaultValue;
+
+                    // If the value is not the default value (and it's not null) we'll write it
+                    if (!object.Equals(propertyValue, defaultValue) && propertyValue != null)
+                    {
+                        writer.WriteAttributeString(attr.Name, PropertyValueToString(propertyValue));
+                    }
+                }
+
+                // If it's a content attribute
+                else if (attributes.OfType<NotificationXmlContentAttribute>().Any())
+                {
+                    content = propertyValue;
+                }
+
+                // Otherwise it's an element or collection of elements
+                else
+                {
+                    if (propertyValue != null)
+                    {
+                        elements.Add(propertyValue);
+                    }
+                }
+            }
+
+            // Then write children
+            foreach (object el in elements)
+            {
+                // If it's a collection of children
+                if (el is IEnumerable)
+                {
+                    foreach (object child in el as IEnumerable)
+                    {
+                        Write(writer, child);
+                    }
+
+                    continue;
+                }
+
+                // Otherwise just write the single element
+                Write(writer, el);
+            }
+
+            // Then write any content if there is content
+            if (content != null)
+            {
+                string contentString = content.ToString();
+                if (!string.IsNullOrWhiteSpace(contentString))
+                {
+                    writer.WriteString(contentString);
+                }
+            }
+
+            writer.WriteEndElement();
+        }
+
+        private static object GetPropertyValue(PropertyInfo propertyInfo, object obj)
+        {
+#if NETFX_CORE
+            return propertyInfo.GetValue(obj);
+#else
+            return propertyInfo.GetValue(obj, null);
+#endif
+        }
+
+        private static string PropertyValueToString(object propertyValue)
+        {
+            Type type = propertyValue.GetType();
+
+            if (IsEnum(type))
+            {
+                EnumStringAttribute enumStringAttr = GetEnumStringAttribute(propertyValue as Enum);
+
+                if (enumStringAttr != null)
+                {
+                    return enumStringAttr.String;
+                }
+            }
+            else if (propertyValue is bool)
+            {
+                if ((bool)propertyValue)
+                {
+                    return "true";
+                }
+
+                return "false";
+            }
+            else if (propertyValue is DateTimeOffset?)
+            {
+                DateTimeOffset? dateTime = propertyValue as DateTimeOffset?;
+                if (dateTime.HasValue)
+                {
+                    // ISO 8601 format
+                    return System.Xml.XmlConvert.ToString(dateTime.Value);
+                }
+                else
+                {
+                    return null;
+                }
+            }
+
+            return propertyValue.ToString();
+        }
+
+        private static EnumStringAttribute GetEnumStringAttribute(Enum enumValue)
+        {
+#if NETFX_CORE
+            return enumValue.GetType().GetTypeInfo().GetDeclaredField(enumValue.ToString()).GetCustomAttribute<EnumStringAttribute>();
+#else
+            MemberInfo[] memberInfo = enumValue.GetType().GetMember(enumValue.ToString());
+
+            if (memberInfo != null && memberInfo.Length > 0)
+            {
+                object[] attrs = memberInfo[0].GetCustomAttributes(typeof(EnumStringAttribute), false);
+
+                if (attrs != null && attrs.Length > 0)
+                    return attrs[0] as EnumStringAttribute;
+            }
+
+            return null;
+#endif
+        }
+
+        private static bool IsEnum(Type type)
+        {
+#if NETFX_CORE
+            return type.GetTypeInfo().IsEnum;
+#else
+            return type.IsEnum;
+#endif
+        }
+
+        private static IEnumerable<PropertyInfo> GetProperties(Type type)
+        {
+#if NETFX_CORE
+            return type.GetTypeInfo().DeclaredProperties;
+#else
+            return type.GetProperties();
+#endif
+        }
+
+        private static NotificationXmlElementAttribute GetElementAttribute(Type type)
+        {
+            return GetCustomAttributes(type).OfType<NotificationXmlElementAttribute>().FirstOrDefault();
+        }
+
+        private static IEnumerable<Attribute> GetCustomAttributes(Type type)
+        {
+#if NETFX_CORE
+            return type.GetTypeInfo().GetCustomAttributes();
+#else
+            return type.GetCustomAttributes(true).OfType<Attribute>();
+#endif
+        }
+
+        private static IEnumerable<Attribute> GetCustomAttributes(PropertyInfo propertyInfo)
+        {
+#if NETFX_CORE
+            return propertyInfo.GetCustomAttributes();
+#else
+            return propertyInfo.GetCustomAttributes(true).OfType<Attribute>();
+#endif
+        }
+
+        /// <summary>
+        /// Gets the provided binding value, if it exists. Otherwise, falls back to the absolute value.
+        /// </summary>
+        /// <typeparam name="T">The type of the enum of the class properties.</typeparam>
+        /// <param name="bindings">The collection of data-bound values.</param>
+        /// <param name="bindableProperty">The property to obtain.</param>
+        /// <param name="absoluteValue">The absolute value, if any.</param>
+        /// <returns>The provided binding value, if it exists. Otherwise, falls back to the absolute value.</returns>
+        internal static string GetBindingOrAbsoluteXmlValue<T>(IDictionary<T, string> bindings, T bindableProperty, string absoluteValue)
+        {
+            // If a binding is provided, use the binding value
+            string bindingValue;
+            if (bindings.TryGetValue(bindableProperty, out bindingValue))
+            {
+                return "{" + bindingValue + "}";
+            }
+
+            // Otherwise fallback to the absolute value
+            return absoluteValue;
+        }
+    }
+}

+ 57 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/GenerateNugetPackage.bat

@@ -0,0 +1,57 @@
+@echo off
+
+set files=..\Microsoft.Windows.Toolkit.Notifications.Portable\bin\Release\Microsoft.Windows.Toolkit.Notifications.dll
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.Portable\bin\Release\Microsoft.Windows.Toolkit.Notifications.pdb
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.Portable\bin\Release\Microsoft.Windows.Toolkit.Notifications.xml
+
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.WinRT\bin\Release\Microsoft.Windows.Toolkit.Notifications.winmd
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.WinRT\bin\Release\Microsoft.Windows.Toolkit.Notifications.pri
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.WinRT\bin\Release\Microsoft.Windows.Toolkit.Notifications.pdb
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.WinRT\bin\Release\Microsoft.Windows.Toolkit.Notifications.xml
+
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.NETStandard\bin\Release\Microsoft.Windows.Toolkit.Notifications.dll
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.NETStandard\bin\Release\Microsoft.Windows.Toolkit.Notifications.pdb
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.NETStandard\bin\Release\Microsoft.Windows.Toolkit.Notifications.xml
+
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.UWP\bin\Release\Microsoft.Windows.Toolkit.Notifications.dll
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.UWP\bin\Release\Microsoft.Windows.Toolkit.Notifications.pdb
+set files=%files% ..\Microsoft.Windows.Toolkit.Notifications.UWP\bin\Release\Microsoft.Windows.Toolkit.Notifications.xml
+
+FOR %%f IN (%files%) DO IF NOT EXIST %%f call :file_not_found %%f
+
+
+echo Here are the current timestamps on the DLL's...
+echo.
+
+FOR %%f IN (%files%) DO ECHO %%~tf %%f
+
+echo.
+
+PAUSE
+
+
+
+echo Welcome, let's create a new NuGet package for Notifications!
+echo.
+
+set /p version="Enter Version Number (ex. 10240.0.0): "
+
+if not exist "NugetPackages" mkdir "NugetPackages"
+
+"C:\Program Files (x86)\NuGet\nuget.exe" pack Microsoft.Windows.Toolkit.Notifications.nuspec -Version %version% -OutputDirectory "NugetPackages"
+
+"C:\Program Files (x86)\NuGet\nuget.exe" pack Microsoft.Windows.Toolkit.Notifications.JavaScript.nuspec -Version %version% -OutputDirectory "NugetPackages"
+
+PAUSE
+
+explorer NugetPackages
+
+
+
+
+exit
+:file_not_found
+
+echo File not found: %1
+PAUSE
+exit

+ 114 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Microsoft.Toolkit.Uwp.Notifications.Shared.projitems

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
+    <HasSharedItems>true</HasSharedItems>
+    <SharedGUID>8bacd7a9-b205-4adf-bda9-763b30a66576</SharedGUID>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration">
+    <Import_RootNamespace>Microsoft.Toolkit.Uwp.Notifications</Import_RootNamespace>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveGroup.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveHelper.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveImageEnums.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBar.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBarBindableProperty.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveProgressBarValue.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveSubgroup.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveSubgroupEnums.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveTextBindableProperty.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\AdaptiveTextEnums.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\BaseImageHelper.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\BaseTextHelper.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\BindableValues\BindableProgressBarValue.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\BindableValues\BindableString.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveProgressBar.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\IAdaptiveSubgroupChild.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveGroup.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveImageEnums.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveSubgroup.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\Elements\Element_AdaptiveText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\IAdaptiveChild.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\IBaseImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Adaptive\IBaseText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Badges\BadgeGlyphContent.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Badges\BadgeGlyphValue.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Badges\BadgeNumericContent.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\ArgumentValidator.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\BaseElement.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\INotificationContent.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\EnumStringAttribute.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\LimitedList{T}.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\NotificationContentValidationException.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\NotificationXmlAttributeAttribute.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\NotificationXmlContentAttribute.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\NotificationXmlElementAttribute.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Common\XmlWriterHelper.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\ITileBindingContentAdaptiveChild.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBackgroundImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBasicImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileCommon.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\Elements\TileElementsCommon.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\Elements\Element_Tile.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\Elements\Element_TileBinding.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\Elements\Element_TileVisual.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileImages.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\SpecialTemplates\TileBindingContentContact.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\SpecialTemplates\TileBindingContentIconic.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\SpecialTemplates\TileBindingContentPeople.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\SpecialTemplates\TileBindingContentPhotos.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBasicText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBinding.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBindingContentAdaptive.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileBranding.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileContent.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TilePeekImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileSizeToAdaptiveTemplateConverter.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileTemplateNameV3.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileTextStacking.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Tiles\TileVisual.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastHeader.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\IElement_ToastActivatable.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastActivationOptions.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\IToastBindingGenericChild.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\IToastButton.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\IToastInput.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastActionsCustom.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastActionsSnoozeAndDismiss.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastButtonDismiss.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastButtonSnooze.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastCommon.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_Toast.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastAction.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastActions.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastAudio.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastBinding.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastInput.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastSelection.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\Elements\Element_ToastVisual.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\IToastActions.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastAudio.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastBindingGeneric.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastButton.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastContent.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastContextMenuItem.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastGenericAppLogo.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastGenericAppLogoEnums.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastGenericAttributionText.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastGenericHeroImage.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastHeader.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastSelectionBox.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastSelectionBoxItem.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastTextBox.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)Toasts\ToastVisual.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="$(MSBuildThisFileDirectory)readme.md" />
+  </ItemGroup>
+</Project>

+ 13 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Microsoft.Toolkit.Uwp.Notifications.Shared.shproj

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>8bacd7a9-b205-4adf-bda9-763b30a66576</ProjectGuid>
+    <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
+  </PropertyGroup>
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
+  <PropertyGroup />
+  <Import Project="Microsoft.Toolkit.Uwp.Notifications.Shared.projitems" Label="Shared" />
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
+</Project>

+ 20 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_Tile.cs

@@ -0,0 +1,20 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    [NotificationXmlElement("tile")]
+    internal sealed class Element_Tile : BaseElement
+    {
+        public Element_TileVisual Visual { get; set; }
+    }
+}

+ 135 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_TileBinding.cs

@@ -0,0 +1,135 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    [NotificationXmlElement("binding")]
+    internal sealed class Element_TileBinding : IElementWithDescendants
+    {
+        internal const TileBranding DEFAULT_BRANDING = TileBranding.Auto;
+        internal const TileTextStacking DEFAULT_TEXT_STACKING = TileTextStacking.Top;
+        internal const int DEFAULT_OVERLAY = 20;
+
+        public Element_TileBinding(TileTemplateNameV3 template)
+        {
+            Template = template;
+        }
+
+        [NotificationXmlAttribute("template")]
+        public TileTemplateNameV3 Template { get; private set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language; for instance, a value of
+        ///
+        /// "www.website.com/images/hello.png"
+        ///
+        /// included in the notification becomes
+        ///
+        /// "www.website.com/images/hello.png?ms-scale=100&amp;ms-contrast=standard&amp;ms-lang=en-us"
+        /// </summary>
+        [NotificationXmlAttribute("addImageQuery")]
+        public bool? AddImageQuery { get; set; }
+
+        /// <summary>
+        /// A default base URI that is combined with relative URIs in image source attributes.
+        /// </summary>
+        [NotificationXmlAttribute("baseUri")]
+        public Uri BaseUri { get; set; }
+
+        /// <summary>
+        /// The form that the Tile should use to display the app's brand.
+        /// </summary>
+        [NotificationXmlAttribute("branding", DEFAULT_BRANDING)]
+        public TileBranding Branding { get; set; } = DEFAULT_BRANDING;
+
+        /// <summary>
+        /// Set to a sender-defined string that uniquely identifies the content of the notification. This prevents duplicates in the situation where a large Tile template is displaying the last three wide Tile notifications.
+        ///
+        /// Required: NO
+        /// </summary>
+        [NotificationXmlAttribute("contentId")]
+        public string ContentId { get; set; }
+
+        /// <summary>
+        /// An optional string to override the Tile's display name while showing this notification.
+        /// </summary>
+        [NotificationXmlAttribute("displayName")]
+        public string DisplayName { get; set; }
+
+        /// <summary>
+        /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides that in visual, but can be overriden by that in text. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string. See Remarks for when this value isn't specified.
+        /// </summary>
+        [NotificationXmlAttribute("lang")]
+        public string Language { get; set; }
+
+        [NotificationXmlAttribute("hint-lockDetailedStatus1")]
+        public string LockDetailedStatus1 { get; set; }
+
+        [NotificationXmlAttribute("hint-lockDetailedStatus2")]
+        public string LockDetailedStatus2 { get; set; }
+
+        [NotificationXmlAttribute("hint-lockDetailedStatus3")]
+        public string LockDetailedStatus3 { get; set; }
+
+        [NotificationXmlAttribute("arguments")]
+        public string Arguments { get; set; }
+
+        /// <summary>
+        /// Throws exception if value is invalid
+        /// </summary>
+        /// <param name="value">Overlay value (0-100)</param>
+        internal static void CheckOverlayValue(int value)
+        {
+            if (value < 0 || value > 100)
+            {
+                throw new ArgumentOutOfRangeException("Overlay must be between 0 and 100, inclusive.");
+            }
+        }
+
+        [NotificationXmlAttribute("hint-presentation")]
+        public TilePresentation? Presentation { get; set; }
+
+        [NotificationXmlAttribute("hint-textStacking", DEFAULT_TEXT_STACKING)]
+        public TileTextStacking TextStacking { get; set; } = DEFAULT_TEXT_STACKING;
+
+        public IList<IElement_TileBindingChild> Children { get; private set; } = new List<IElement_TileBindingChild>();
+
+        /// <summary>
+        /// Generates an enumerable collection of children and all those children's children
+        /// </summary>
+        /// <returns>Enumerable collection of children and all those children's children.</returns>
+        public IEnumerable<object> Descendants()
+        {
+            foreach (IElement_TileBindingChild child in Children)
+            {
+                // Return the child
+                yield return child;
+
+                // And if it has descendants, return the descendants
+                if (child is IElementWithDescendants)
+                {
+                    foreach (object descendant in (child as IElementWithDescendants).Descendants())
+                    {
+                        yield return descendant;
+                    }
+                }
+            }
+        }
+    }
+
+    internal interface IElement_TileBindingChild
+    {
+    }
+}

+ 47 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/Element_TileVisual.cs

@@ -0,0 +1,47 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    [NotificationXmlElement("visual")]
+    internal sealed class Element_TileVisual
+    {
+        internal const TileBranding DEFAULT_BRANDING = TileBranding.Auto;
+        internal const bool DEFAULT_ADD_IMAGE_QUERY = false;
+
+        [NotificationXmlAttribute("addImageQuery")]
+        public bool? AddImageQuery { get; set; }
+
+        [NotificationXmlAttribute("baseUri")]
+        public Uri BaseUri { get; set; }
+
+        [NotificationXmlAttribute("branding", DEFAULT_BRANDING)]
+        public TileBranding Branding { get; set; } = DEFAULT_BRANDING;
+
+        [NotificationXmlAttribute("contentId")]
+        public string ContentId { get; set; }
+
+        [NotificationXmlAttribute("displayName")]
+        public string DisplayName { get; set; }
+
+        [NotificationXmlAttribute("lang")]
+        public string Language { get; set; }
+
+        [NotificationXmlAttribute("arguments")]
+        public string Arguments { get; set; }
+
+        public IList<Element_TileBinding> Bindings { get; private set; } = new List<Element_TileBinding>();
+    }
+}

+ 38 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/Elements/TileElementsCommon.cs

@@ -0,0 +1,38 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal enum TilePresentation
+    {
+        [EnumString("people")]
+        People,
+
+        [EnumString("photos")]
+        Photos,
+
+        [EnumString("contact")]
+        Contact
+    }
+
+    internal enum TileImagePlacement
+    {
+        [EnumString("inline")]
+        Inline,
+
+        [EnumString("background")]
+        Background,
+
+        [EnumString("peek")]
+        Peek
+    }
+}

+ 22 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/ITileBindingContentAdaptiveChild.cs

@@ -0,0 +1,22 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Elements that can be direct children of <see cref="TileBindingContentAdaptive"/>, including (<see cref="AdaptiveText"/>, <see cref="AdaptiveImage"/>, and <see cref="AdaptiveGroup"/>).
+    /// </summary>
+    public interface ITileBindingContentAdaptiveChild
+    {
+        // Blank interface simply for compile-enforcing the child types in the list.
+    }
+}

+ 51 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentContact.cs

@@ -0,0 +1,51 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Phone-only. Supported on Small, Medium, and Wide.
+    /// </summary>
+    public sealed class TileBindingContentContact : ITileBindingContent
+    {
+        /// <summary>
+        /// The image to display.
+        /// </summary>
+        public TileBasicImage Image { get; set; }
+
+        /// <summary>
+        /// A line of text that is displayed. Not displayed on Small Tile.
+        /// </summary>
+        public TileBasicText Text { get; set; }
+
+        internal TileTemplateNameV3 GetTemplateName(TileSize size)
+        {
+            return TileSizeToAdaptiveTemplateConverter.Convert(size);
+        }
+
+        internal void PopulateElement(Element_TileBinding binding, TileSize size)
+        {
+            binding.Presentation = TilePresentation.Contact;
+
+            // Small size doesn't display the text, so no reason to include it in the payload
+            if (Text != null && size != TileSize.Small)
+            {
+                binding.Children.Add(Text.ConvertToElement());
+            }
+
+            if (Image != null)
+            {
+                binding.Children.Add(Image.ConvertToElement());
+            }
+        }
+    }
+}

+ 52 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentIconic.cs

@@ -0,0 +1,52 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Supported on Small and Medium. Enables an iconic Tile template, where you can have an icon and badge display next to each other on the Tile, in true classic Windows Phone style. The number next to the icon is achieved through a separate badge notification.
+    /// </summary>
+    public sealed class TileBindingContentIconic : ITileBindingContent
+    {
+        /// <summary>
+        /// At minimum, to support both Desktop and Phone, Small and Medium tiles, provide a square aspect ratio image with a resolution of 200x200, PNG format, with transparency and no color other than white. For more info see: http://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/31/iconic-tile-template-for-windows-10.aspx
+        /// </summary>
+        public TileBasicImage Icon { get; set; }
+
+        internal TileTemplateNameV3 GetTemplateName(TileSize size)
+        {
+            switch (size)
+            {
+                case TileSize.Small:
+                    return TileTemplateNameV3.TileSquare71x71IconWithBadge;
+
+                case TileSize.Medium:
+                    return TileTemplateNameV3.TileSquare150x150IconWithBadge;
+
+                default:
+                    throw new ArgumentException("The Iconic template is only supported on Small and Medium tiles.");
+            }
+        }
+
+        internal void PopulateElement(Element_TileBinding binding, TileSize size)
+        {
+            if (Icon != null)
+            {
+                var element = Icon.ConvertToElement();
+                element.Id = 1;
+                binding.Children.Add(element);
+            }
+        }
+    }
+}

+ 43 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentPeople.cs

@@ -0,0 +1,43 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// New in 1511: Supported on Medium, Wide, and Large (Desktop and Mobile).
+    /// Previously for RTM: Phone-only. Supported on Medium and Wide.
+    /// </summary>
+    public sealed class TileBindingContentPeople : ITileBindingContent
+    {
+        /// <summary>
+        /// Images that will roll around as circles.
+        /// </summary>
+        public IList<TileBasicImage> Images { get; private set; } = new List<TileBasicImage>();
+
+        internal TileTemplateNameV3 GetTemplateName(TileSize size)
+        {
+            return TileSizeToAdaptiveTemplateConverter.Convert(size);
+        }
+
+        internal void PopulateElement(Element_TileBinding binding, TileSize size)
+        {
+            binding.Presentation = TilePresentation.People;
+
+            foreach (var img in Images)
+            {
+                binding.Children.Add(img.ConvertToElement());
+            }
+        }
+    }
+}

+ 42 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/SpecialTemplates/TileBindingContentPhotos.cs

@@ -0,0 +1,42 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System.Collections.Generic;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Animates through a slideshow of photos. Supported on all sizes.
+    /// </summary>
+    public sealed class TileBindingContentPhotos : ITileBindingContent
+    {
+        /// <summary>
+        /// Up to 12 images can be provided (Mobile will only display up to 9), which will be used for the slideshow. Adding more than 12 will throw an exception.
+        /// </summary>
+        public IList<TileBasicImage> Images { get; private set; } = new LimitedList<TileBasicImage>(12);
+
+        internal TileTemplateNameV3 GetTemplateName(TileSize size)
+        {
+            return TileSizeToAdaptiveTemplateConverter.Convert(size);
+        }
+
+        internal void PopulateElement(Element_TileBinding binding, TileSize size)
+        {
+            binding.Presentation = TilePresentation.Photos;
+
+            foreach (var img in Images)
+            {
+                binding.Children.Add(img.ConvertToElement());
+            }
+        }
+    }
+}

+ 98 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBackgroundImage.cs

@@ -0,0 +1,98 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// A full-bleed background image that appears beneath the Tile content.
+    /// </summary>
+    public sealed class TileBackgroundImage : IBaseImage
+    {
+        private string _source;
+
+        /// <summary>
+        /// The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.
+        /// </summary>
+        public string Source
+        {
+            get { return _source; }
+            set { BaseImageHelper.SetSource(ref _source, value); }
+        }
+
+        /// <summary>
+        /// A description of the image, for users of assistive technologies.
+        /// </summary>
+        public string AlternateText { get; set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language.
+        /// </summary>
+        public bool? AddImageQuery { get; set; }
+
+        private int? _hintOverlay;
+
+        /// <summary>
+        /// A black overlay on the background image. This value controls the opacity of the black overlay, with 0 being no overlay and 100 being completely black. Defaults to 20.
+        /// </summary>
+        public int? HintOverlay
+        {
+            get
+            {
+                return _hintOverlay;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    Element_TileBinding.CheckOverlayValue(value.Value);
+                }
+
+                _hintOverlay = value;
+            }
+        }
+
+        /// <summary>
+        /// New in 1511: Control the desired cropping of the image.
+        /// Previously for RTM: Did not exist, value will be ignored and background image will be displayed without any cropping.
+        /// </summary>
+        public TileBackgroundImageCrop HintCrop { get; set; }
+
+        internal Element_AdaptiveImage ConvertToElement()
+        {
+            Element_AdaptiveImage image = BaseImageHelper.CreateBaseElement(this);
+
+            image.Placement = AdaptiveImagePlacement.Background;
+            image.Crop = GetAdaptiveImageCrop();
+            image.Overlay = HintOverlay;
+
+            return image;
+        }
+
+        private AdaptiveImageCrop GetAdaptiveImageCrop()
+        {
+            switch (HintCrop)
+            {
+                case TileBackgroundImageCrop.Circle:
+                    return AdaptiveImageCrop.Circle;
+
+                case TileBackgroundImageCrop.None:
+                    return AdaptiveImageCrop.None;
+
+                default:
+                    return AdaptiveImageCrop.Default;
+            }
+        }
+    }
+}

+ 50 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBasicImage.cs

@@ -0,0 +1,50 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// An image used on various special templates for the Tile.
+    /// </summary>
+    public sealed class TileBasicImage : IBaseImage
+    {
+        private string _source;
+
+        /// <summary>
+        /// The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.
+        /// </summary>
+        public string Source
+        {
+            get { return _source; }
+            set { BaseImageHelper.SetSource(ref _source, value); }
+        }
+
+        /// <summary>
+        /// A description of the image, for users of assistive technologies.
+        /// </summary>
+        public string AlternateText { get; set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language.
+        /// </summary>
+        public bool? AddImageQuery { get; set; }
+
+        internal Element_AdaptiveImage ConvertToElement()
+        {
+            Element_AdaptiveImage image = BaseImageHelper.CreateBaseElement(this);
+
+            return image;
+        }
+    }
+}

+ 50 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBasicText.cs

@@ -0,0 +1,50 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// A text element on the Tile.
+    /// </summary>
+    public sealed class TileBasicText
+    {
+        /// <summary>
+        /// The text value that will be shown in the text field.
+        /// </summary>
+        public string Text { get; set; }
+
+        /// <summary>
+        /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides any other specified locale, such as that in binding or visual. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string.
+        /// </summary>
+        public string Lang { get; set; }
+
+        internal Element_AdaptiveText ConvertToElement()
+        {
+            return new Element_AdaptiveText()
+            {
+                Text = Text,
+                Lang = Lang
+            };
+        }
+
+        /// <summary>
+        /// Returns the Text property's value.
+        /// </summary>
+        /// <returns>The Text property's value.</returns>
+        public override string ToString()
+        {
+            return Text;
+        }
+    }
+}

+ 173 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBinding.cs

@@ -0,0 +1,173 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// The binding element contains the visual content for a specific Tile size.
+    /// </summary>
+    public sealed class TileBinding
+    {
+        /// <summary>
+        /// The target locale of the XML payload, specified as a BCP-47 language tags such as "en-US" or "fr-FR". The locale specified here overrides that in visual, but can be overriden by that in text. If this value is a literal string, this attribute defaults to the user's UI language. If this value is a string reference, this attribute defaults to the locale chosen by Windows Runtime in resolving the string. See Remarks for when this value isn't specified.
+        /// </summary>
+        public string Language { get; set; }
+
+        /// <summary>
+        /// A default base URI that is combined with relative URIs in image source attributes. Defaults to null.
+        /// </summary>
+        public Uri BaseUri { get; set; }
+
+        /// <summary>
+        /// The form that the Tile should use to display the app's brand..
+        /// </summary>
+        public TileBranding Branding { get; set; } = Element_TileBinding.DEFAULT_BRANDING;
+
+        /// <summary>
+        /// Defaults to false. Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language; for instance, a value of
+        ///
+        /// "www.website.com/images/hello.png"
+        ///
+        /// included in the notification becomes
+        ///
+        /// "www.website.com/images/hello.png?ms-scale=100&amp;ms-contrast=standard&amp;ms-lang=en-us"
+        /// </summary>
+        public bool? AddImageQuery { get; set; }
+
+        /// <summary>
+        /// Set to a sender-defined string that uniquely identifies the content of the notification. This prevents duplicates in the situation where a large Tile template is displaying the last three wide Tile notifications.
+        /// </summary>
+        public string ContentId { get; set; }
+
+        /// <summary>
+        /// An optional string to override the Tile's display name while showing this notification.
+        /// </summary>
+        public string DisplayName { get; set; }
+
+        /// <summary>
+        /// New in Anniversary Update: App-defined data that is passed back to your app via the TileActivatedInfo property on LaunchActivatedEventArgs when the user launches your app from the Live Tile. This allows you to know which Tile notifications your user saw when they tapped your Live Tile. On devices without the Anniversary Update, this will simply be ignored.
+        /// </summary>
+        public string Arguments { get; set; }
+
+        /// <summary>
+        /// The actual content to be displayed. One of <see cref="TileBindingContentAdaptive"/>, <see cref="TileBindingContentIconic"/>, <see cref="TileBindingContentContact"/>, <see cref="TileBindingContentPeople"/>, or <see cref="TileBindingContentPhotos"/>
+        /// </summary>
+        public ITileBindingContent Content { get; set; }
+
+        internal Element_TileBinding ConvertToElement(TileSize size)
+        {
+            TileTemplateNameV3 templateName = GetTemplateName(Content, size);
+
+            Element_TileBinding binding = new Element_TileBinding(templateName)
+            {
+                Language = Language,
+                BaseUri = BaseUri,
+                Branding = Branding,
+                AddImageQuery = AddImageQuery,
+                DisplayName = DisplayName,
+                ContentId = ContentId,
+                Arguments = Arguments
+
+                // LockDetailedStatus gets populated by TileVisual
+            };
+
+            PopulateElement(Content, binding, size);
+
+            return binding;
+        }
+
+        private static void PopulateElement(ITileBindingContent bindingContent, Element_TileBinding binding, TileSize size)
+        {
+            if (bindingContent == null)
+            {
+                return;
+            }
+
+            if (bindingContent is TileBindingContentAdaptive)
+            {
+                (bindingContent as TileBindingContentAdaptive).PopulateElement(binding, size);
+            }
+            else if (bindingContent is TileBindingContentContact)
+            {
+                (bindingContent as TileBindingContentContact).PopulateElement(binding, size);
+            }
+            else if (bindingContent is TileBindingContentIconic)
+            {
+                (bindingContent as TileBindingContentIconic).PopulateElement(binding, size);
+            }
+            else if (bindingContent is TileBindingContentPeople)
+            {
+                (bindingContent as TileBindingContentPeople).PopulateElement(binding, size);
+            }
+            else if (bindingContent is TileBindingContentPhotos)
+            {
+                (bindingContent as TileBindingContentPhotos).PopulateElement(binding, size);
+            }
+            else
+            {
+                throw new NotImplementedException("Unknown binding content type: " + bindingContent.GetType());
+            }
+        }
+
+        private static TileTemplateNameV3 GetTemplateName(ITileBindingContent bindingContent, TileSize size)
+        {
+            if (bindingContent == null)
+            {
+                return TileSizeToAdaptiveTemplateConverter.Convert(size);
+            }
+
+            if (bindingContent is TileBindingContentAdaptive)
+            {
+                return (bindingContent as TileBindingContentAdaptive).GetTemplateName(size);
+            }
+
+            if (bindingContent is TileBindingContentContact)
+            {
+                return (bindingContent as TileBindingContentContact).GetTemplateName(size);
+            }
+
+            if (bindingContent is TileBindingContentIconic)
+            {
+                return (bindingContent as TileBindingContentIconic).GetTemplateName(size);
+            }
+
+            if (bindingContent is TileBindingContentPeople)
+            {
+                return (bindingContent as TileBindingContentPeople).GetTemplateName(size);
+            }
+
+            if (bindingContent is TileBindingContentPhotos)
+            {
+                return (bindingContent as TileBindingContentPhotos).GetTemplateName(size);
+            }
+
+            throw new NotImplementedException("Unknown binding content type: " + bindingContent.GetType());
+        }
+    }
+
+    /// <summary>
+    /// Visual Tile content. One of <see cref="TileBindingContentAdaptive"/>, <see cref="TileBindingContentIconic"/>, <see cref="TileBindingContentPhotos"/>, <see cref="TileBindingContentPeople"/>, or <see cref="TileBindingContentContact"/>.
+    /// </summary>
+    public interface ITileBindingContent
+    {
+    }
+
+    internal enum TileTemplate
+    {
+        TileSmall,
+        TileMedium,
+        TileWide,
+        TileLarge
+    }
+}

+ 80 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBindingContentAdaptive.cs

@@ -0,0 +1,80 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System.Collections.Generic;
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Supported on all sizes. This is the recommended way of specifying your Tile content. Adaptive Tile templates are the de-facto choice for Windows 10, and you can create a wide variety of custom Tiles through adaptive.
+    /// </summary>
+    public sealed class TileBindingContentAdaptive : ITileBindingContent
+    {
+        /// <summary>
+        /// <see cref="AdaptiveText"/>, <see cref="AdaptiveImage"/>, and <see cref="AdaptiveGroup"/> objects can be added as children. The children are displayed in a vertical StackPanel fashion.
+        /// </summary>
+        public IList<ITileBindingContentAdaptiveChild> Children { get; private set; } = new List<ITileBindingContentAdaptiveChild>();
+
+        /// <summary>
+        /// An optional background image that gets displayed behind all the Tile content, full bleed.
+        /// </summary>
+        public TileBackgroundImage BackgroundImage { get; set; }
+
+        /// <summary>
+        /// An optional peek image that animates in from the top of the Tile.
+        /// </summary>
+        public TilePeekImage PeekImage { get; set; }
+
+        /// <summary>
+        /// Controls the text stacking (vertical alignment) of the entire binding element.
+        /// </summary>
+        public TileTextStacking TextStacking { get; set; } = Element_TileBinding.DEFAULT_TEXT_STACKING;
+
+        internal TileTemplateNameV3 GetTemplateName(TileSize size)
+        {
+            return TileSizeToAdaptiveTemplateConverter.Convert(size);
+        }
+
+        internal void PopulateElement(Element_TileBinding binding, TileSize size)
+        {
+            // Assign properties
+            binding.TextStacking = TextStacking;
+
+            // Add the background image if there's one
+            if (BackgroundImage != null)
+            {
+                // And add it as a child
+                binding.Children.Add(BackgroundImage.ConvertToElement());
+            }
+
+            // Add the peek image if there's one
+            if (PeekImage != null)
+            {
+                var el = PeekImage.ConvertToElement();
+
+                binding.Children.Add(el);
+            }
+
+            // And then add all the children
+            foreach (var child in Children)
+            {
+                binding.Children.Add(ConvertToBindingChildElement(child));
+            }
+        }
+
+        private static IElement_TileBindingChild ConvertToBindingChildElement(ITileBindingContentAdaptiveChild child)
+        {
+            return (IElement_TileBindingChild)AdaptiveHelper.ConvertToElement(child);
+        }
+    }
+}

+ 49 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileBranding.cs

@@ -0,0 +1,49 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// The form that the Tile should use to display the app's brand.
+    /// </summary>
+    public enum TileBranding
+    {
+        /// <summary>
+        /// The default choice. If ShowNameOn___ is true for the Tile size being displayed, then branding will be "Name". Otherwise it will be "None".
+        /// </summary>
+        Auto,
+
+        /// <summary>
+        /// No branding will be displayed.
+        /// </summary>
+        [EnumString("none")]
+        None,
+
+        /// <summary>
+        /// The DisplayName will be shown.
+        /// </summary>
+        [EnumString("name")]
+        Name,
+
+        /// <summary>
+        /// Desktop-only. The Square44x44Logo will be shown. On Mobile, this will fallback to Name.
+        /// </summary>
+        [EnumString("logo")]
+        Logo,
+
+        /// <summary>
+        /// Desktop-only. Both the DisplayName and Square44x44Logo will be shown. On Mobile, this will fallback to Name.
+        /// </summary>
+        [EnumString("nameAndLogo")]
+        NameAndLogo
+    }
+}

+ 22 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileCommon.cs

@@ -0,0 +1,22 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal enum TileSize
+    {
+        Small,
+        Medium,
+        Wide,
+        Large
+    }
+}

+ 65 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileContent.cs

@@ -0,0 +1,65 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+#if WINDOWS_UWP
+using Windows.Data.Xml.Dom;
+using Windows.UI.Notifications;
+#endif
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Base Tile element, which contains a single visual element.
+    /// </summary>
+    public sealed class TileContent
+    {
+        /// <summary>
+        /// The visual element is required.
+        /// </summary>
+        public TileVisual Visual { get; set; }
+
+        /// <summary>
+        /// Retrieves the notification XML content as a string, so that it can be sent with a HTTP POST in a push notification.
+        /// </summary>
+        /// <returns>The notification XML content as a string.</returns>
+        public string GetContent()
+        {
+            return ConvertToElement().GetContent();
+        }
+
+#if WINDOWS_UWP
+        /// <summary>
+        /// Retrieves the notification XML content as a WinRT XmlDocument, so that it can be used with a local Tile notification's constructor on either <see cref="TileNotification"/> or <see cref="ScheduledTileNotification"/>.
+        /// </summary>
+        /// <returns>The notification XML content as a WinRT XmlDocument.</returns>
+        public XmlDocument GetXml()
+        {
+            XmlDocument doc = new XmlDocument();
+            doc.LoadXml(GetContent());
+
+            return doc;
+        }
+#endif
+
+        internal Element_Tile ConvertToElement()
+        {
+            var tile = new Element_Tile();
+
+            if (Visual != null)
+            {
+                tile.Visual = Visual.ConvertToElement();
+            }
+
+            return tile;
+        }
+    }
+}

+ 60 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileImages.cs

@@ -0,0 +1,60 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// Specify the desired cropping of the image.
+    /// </summary>
+    public enum TileBackgroundImageCrop
+    {
+        /// <summary>
+        /// Cropping style automatically determined by renderer.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Default value. Image is not cropped.
+        /// </summary>
+        [EnumString("none")]
+        None,
+
+        /// <summary>
+        /// Image is cropped to a circle shape.
+        /// </summary>
+        [EnumString("circle")]
+        Circle
+    }
+
+    /// <summary>
+    /// Specify the desired cropping of the image.
+    /// </summary>
+    public enum TilePeekImageCrop
+    {
+        /// <summary>
+        /// Cropping style automatically determined by renderer.
+        /// </summary>
+        Default,
+
+        /// <summary>
+        /// Default value. Image is not cropped.
+        /// </summary>
+        [EnumString("none")]
+        None,
+
+        /// <summary>
+        /// Image is cropped to a circle shape.
+        /// </summary>
+        [EnumString("circle")]
+        Circle
+    }
+}

+ 99 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TilePeekImage.cs

@@ -0,0 +1,99 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    /// <summary>
+    /// A peek image that animates in from the top of the Tile.
+    /// </summary>
+    public sealed class TilePeekImage : IBaseImage
+    {
+        private string _source;
+
+        /// <summary>
+        /// The URI of the image. Can be from your application package, application data, or the internet. Internet images must be less than 200 KB in size.
+        /// </summary>
+        public string Source
+        {
+            get { return _source; }
+            set { BaseImageHelper.SetSource(ref _source, value); }
+        }
+
+        /// <summary>
+        /// A description of the image, for users of assistive technologies.
+        /// </summary>
+        public string AlternateText { get; set; }
+
+        /// <summary>
+        /// Set to true to allow Windows to append a query string to the image URI supplied in the Tile notification. Use this attribute if your server hosts images and can handle query strings, either by retrieving an image variant based on the query strings or by ignoring the query string and returning the image as specified without the query string. This query string specifies scale, contrast setting, and language.
+        /// </summary>
+        public bool? AddImageQuery { get; set; }
+
+        private int? _hintOverlay;
+
+        /// <summary>
+        /// New in 1511: A black overlay on the peek image. This value controls the opacity of the black overlay, with 0 being no overlay and 100 being completely black. Defaults to 0.
+        /// Previously for RTM: Did not exist, value will be ignored and peek image will be displayed with 0 overlay.
+        /// </summary>
+        public int? HintOverlay
+        {
+            get
+            {
+                return _hintOverlay;
+            }
+
+            set
+            {
+                if (value != null)
+                {
+                    Element_TileBinding.CheckOverlayValue(value.Value);
+                }
+
+                _hintOverlay = value;
+            }
+        }
+
+        /// <summary>
+        /// New in 1511: Control the desired cropping of the image.
+        /// Previously for RTM: Did not exist, value will be ignored and peek image will be displayed without any cropping.
+        /// </summary>
+        public TilePeekImageCrop HintCrop { get; set; }
+
+        internal Element_AdaptiveImage ConvertToElement()
+        {
+            Element_AdaptiveImage image = BaseImageHelper.CreateBaseElement(this);
+
+            image.Placement = AdaptiveImagePlacement.Peek;
+            image.Crop = GetAdaptiveImageCrop();
+            image.Overlay = HintOverlay;
+
+            return image;
+        }
+
+        private AdaptiveImageCrop GetAdaptiveImageCrop()
+        {
+            switch (HintCrop)
+            {
+                case TilePeekImageCrop.Circle:
+                    return AdaptiveImageCrop.Circle;
+
+                case TilePeekImageCrop.None:
+                    return AdaptiveImageCrop.None;
+
+                default:
+                    return AdaptiveImageCrop.Default;
+            }
+        }
+    }
+}

+ 40 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileSizeToAdaptiveTemplateConverter.cs

@@ -0,0 +1,40 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+using System;
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal static class TileSizeToAdaptiveTemplateConverter
+    {
+        public static TileTemplateNameV3 Convert(TileSize size)
+        {
+            switch (size)
+            {
+                case TileSize.Small:
+                    return TileTemplateNameV3.TileSmall;
+
+                case TileSize.Medium:
+                    return TileTemplateNameV3.TileMedium;
+
+                case TileSize.Wide:
+                    return TileTemplateNameV3.TileWide;
+
+                case TileSize.Large:
+                    return TileTemplateNameV3.TileLarge;
+
+                default:
+                    throw new NotImplementedException();
+            }
+        }
+    }
+}

+ 100 - 0
src/windows/Microsoft.Toolkit.Uwp.Notifications.Shared/Tiles/TileTemplateNameV3.cs

@@ -0,0 +1,100 @@
+// ******************************************************************
+// Copyright (c) Microsoft. All rights reserved.
+// This code is licensed under the MIT License (MIT).
+// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
+// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
+// ******************************************************************
+
+namespace Microsoft.Toolkit.Uwp.Notifications
+{
+    internal enum TileTemplateNameV3
+    {
+        TileMedium,
+        TileSmall,
+        TileWide,
+        TileLarge,
+
+        TileSquare150x150Block,
+        TileSquare150x150Image,
+        TileSquare150x150PeekImageAndText01,
+        TileSquare150x150PeekImageAndText02,
+        TileSquare150x150PeekImageAndText03,
+        TileSquare150x150PeekImageAndText04,
+        TileSquare150x150Text01,
+        TileSquare150x150Text02,
+        TileSquare150x150Text03,
+        TileSquare150x150Text04,
+        TileSquare310x310BlockAndText01,
+        TileSquare310x310BlockAndText02,
+        TileSquare310x310Image,
+        TileSquare310x310ImageAndText01,
+        TileSquare310x310ImageAndText02,
+        TileSquare310x310ImageAndTextOverlay01,
+        TileSquare310x310ImageAndTextOverlay02,
+        TileSquare310x310ImageAndTextOverlay03,
+        TileSquare310x310ImageCollection,
+        TileSquare310x310ImageCollectionAndText01,
+        TileSquare310x310ImageCollectionAndText02,
+        TileSquare310x310SmallImagesAndTextList01,
+        TileSquare310x310SmallImagesAndTextList02,
+        TileSquare310x310SmallImagesAndTextList03,
+        TileSquare310x310SmallImagesAndTextList04,
+        TileSquare310x310Text01,
+        TileSquare310x310Text02,
+        TileSquare310x310Text03,
+        TileSquare310x310Text04,
+        TileSquare310x310Text05,
+        TileSquare310x310Text06,
+        TileSquare310x310Text07,
+        TileSquare310x310Text08,
+        TileSquare310x310TextList01,
+        TileSquare310x310TextList02,
+        TileSquare310x310TextList03,
+        TileWide310x150BlockAndText01,
+        TileWide310x150BlockAndText02,
+        TileWide310x150Image,
+        TileWide310x150ImageAndText01,
+        TileWide310x150ImageAndText02,
+        TileWide310x150ImageCollection,
+        TileWide310x150PeekImage01,
+        TileWide310x150PeekImage02,
+        TileWide310x150PeekImage03,
+        TileWide310x150PeekImage04,
+        TileWide310x150PeekImage05,
+        TileWide310x150PeekImage06,
+        TileWide310x150PeekImageAndText01,
+        TileWide310x150PeekImageAndText02,
+        TileWide310x150PeekImageCollection01,
+        TileWide310x150PeekImageCollection02,
+        TileWide310x150PeekImageCollection03,
+        TileWide310x150PeekImageCollection04,
+        TileWide310x150PeekImageCollection05,
+        TileWide310x150PeekImageCollection06,
+        TileWide310x150SmallImageAndText01,
+        TileWide310x150SmallImageAndText02,
+        TileWide310x150SmallImageAndText03,
+        TileWide310x150SmallImageAndText04,
+        TileWide310x150SmallImageAndText05,
+        TileWide310x150Text01,
+        TileWide310x150Text02,
+        TileWide310x150Text03,
+        TileWide310x150Text04,
+        TileWide310x150Text05,
+        TileWide310x150Text06,
+        TileWide310x150Text07,
+        TileWide310x150Text08,
+        TileWide310x150Text09,
+        TileWide310x150Text10,
+        TileWide310x150Text11,
+
+        TileSquare71x71Image,
+        TileSquare71x71IconWithBadge,
+        TileSquare150x150IconWithBadge,
+        TileWide310x150IconWithBadgeAndText
+    }
+}

Някои файлове не бяха показани, защото твърде много файлове са промени