<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Tiles and Toasts</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/tiles_and_toasts/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/feed.xml</link>
    <description>The official blog of the team that owns the UWP tile and toast API&amp;#039;s.</description>
    <lastBuildDate>Tue, 27 Feb 2018 19:36:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>CONTENT MOVED: Primary Live Tile API - Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/primary-live-tile-api-windows-10</link>
      <pubDate>Wed, 01 Feb 2017 21:23:04 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1176</guid>
      <description><![CDATA[Content moved
Please see the article on docs.microsoft.com for the latest documentation.]]></description>
      <content:encoded><![CDATA[<h2>Content moved</h2>
<p>Please see <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/primary-tile-apis">the article on docs.microsoft.com</a></strong> for the latest documentation.</p>]]></content:encoded>
    </item>
    <item>
      <title>CONTENT MOVED: Progress UI and data binding inside toast notifications - Windows 10 Creators Update</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/progress-ui-and-data-binding-inside-toast-notifications-windows-10-creators-update</link>
      <pubDate>Wed, 01 Feb 2017 21:17:53 GMT</pubDate>
      <dc:creator><![CDATA[leixu2046]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1435</guid>
      <description><![CDATA[Content moved
Please see the article on docs.microsoft.com for the latest documentation.]]></description>
      <content:encoded><![CDATA[<h2>Content moved</h2>
<p>Please see <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-progress-bar">the article on docs.microsoft.com</a></strong> for the latest documentation.</p>]]></content:encoded>
    </item>
    <item>
      <title>CONTENT MOVED: Grouping toast notifications under different headers in Action Center - Windows 10 Creators Update</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/grouping-toast-notifications-under-different-headers-in-action-center-windows-10-creators-update</link>
      <pubDate>Mon, 09 Jan 2017 18:26:58 GMT</pubDate>
      <dc:creator><![CDATA[leixu2046]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1355</guid>
      <description><![CDATA[Content moved
Please see the article on docs.microsoft.com for the latest documentation.]]></description>
      <content:encoded><![CDATA[<h2>Content moved</h2>
<p>Please see <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/toast-headers">the article on docs.microsoft.com</a></strong> for the latest documentation.</p>]]></content:encoded>
    </item>
    <item>
      <title>CONTENT MOVED: Custom timestamp on toast notifications - Windows 10 Creators Update</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/custom-timestamp-on-toast-notifications-windows-10-creators-update</link>
      <pubDate>Mon, 09 Jan 2017 18:26:35 GMT</pubDate>
      <dc:creator><![CDATA[leixu2046]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1335</guid>
      <description><![CDATA[Content moved
Please see the article on docs.microsoft.com for the latest documentation.]]></description>
      <content:encoded><![CDATA[<h2>Content moved</h2>
<p>Please see <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/custom-timestamps-on-toasts">the article on docs.microsoft.com</a></strong> for the latest documentation.</p>]]></content:encoded>
    </item>
    <item>
      <title>Debugging Live Tile issues in Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/debugging-live-tile-issues-in-windows-10</link>
      <pubDate>Fri, 04 Nov 2016 21:58:27 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1285</guid>
      <description><![CDATA[If you're a developer and wondering "Why isn't my Live Tile updating?", you've came to the right...]]></description>
      <content:encoded><![CDATA[If you're a developer and wondering "Why isn't my Live Tile updating?", you've came to the right place! In this article, we will list out all the potential reasons that your tile notification can fail to display.

<h2>Quick checklist</h2>
<ol>
<li>Are you using the <a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/08/20/introducing-notificationsextensions-for-windows-10/">Notifications library</a> to construct your tile notifications?
<ol><li>If not, are you XML-escaping content and constructing valid XML?</li></ol></li>
<li>Are you trimming lengthy text strings, so you don't break the 5 KB payload restriction?</li>
<li>Are you using images in your tile notification?
  <ol>
  <li>Ensure that the path to your images is valid</li>
  <li>If they are HTTP images, are the images less than 200 KB in size?</li>
  </ol>
</li>
<li>Did you include a binding for each tile size you support?</li>
<li>Did you accidently turn off the Live Tile in Start?</li>
</ol>

<h2>Payload larger than 5 KB</h2>
The XML payload that you construct must be no larger than 5 KB. Otherwise, you will get a COMException with HResult 0x803E0115 saying that "The size of the notification content is too large."

For tips on how to reduce your payload size, please read <strong><a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2016/11/04/how-to-keep-your-tile-notification-payload-under-5-kb/">How to keep your tile notification payload under 5 KB</a></strong>.


<h2>Remote HTTP image larger than 200 KB</h2>
Each HTTP image in your tile notification must be smaller than 200 KB. If one is larger than 200 KB, your tile notification will fail to display. To fix this, use a small enough image in your tile notifications so that you won't break the 200 KB limit.

Local images do not have this restriction, so you alternatively could download the HTTP images, save them to app data, and refer to them with ms-appdata:///.


<h2>Invalid XML payload</h2>
If your XML itself isn't valid XML, or if you have invalid unsupported XML elements inside your tile notification, your tile notification will fail to display.

The best way to ensure your tile XML payload is valid is to use the <a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/08/20/introducing-notificationsextensions-for-windows-10/">Notifications library</a> to construct your tile notifications, rather than using raw XML. This will automatically XML encode your content, and it will also ensure the XML generated is 100% valid.

Otherwise, if you're hand-crafting your XML payloads, use the <a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/09/22/introducing-notifications-visualizer-for-windows-10/">Notifications Visualizer</a> app and paste your XML payload into the Visualizer to see if there are any errors. And remember to XML encode any text content you inject into your XML (like the <> brackets or quotes).

<h2>Include bindings for each tile size you support</h2>
By default, an unmodified UWP project supports Small, Medium, and Wide tile sizes. Optionally, you can add a large logo to support the Large tile size.

When you send a tile notification, make sure you include bindings for all the tile sizes your app supports.

<h2>Ensure the Live Tile isn't turned off</h2>
On Desktop, you can right click a Live Tile and turn it off. Make sure you accidently didn't do that at some point.]]></content:encoded>
    </item>
    <item>
      <title>How to keep your tile notification payload under 5 KB</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/how-to-keep-your-tile-notification-payload-under-5-kb</link>
      <pubDate>Fri, 04 Nov 2016 19:48:03 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1295</guid>
      <description><![CDATA[The XML payload that you construct for your tile notifications must be no larger than 5 KB....]]></description>
      <content:encoded><![CDATA[The XML payload that you construct for your tile notifications must be no larger than 5 KB. Otherwise, you will get a COMException with HResult 0x803E0115 saying that "The size of the notification content is too large."

To fix this, you should set limits on the content that you put into your tile notifications. For example, if you're displaying a message that another user typed, limit it to a max number of characters.

<h2>Limits on text length</h2>
The max number of characters you will want to use depends on the tile size. The medium tile is smaller than the large tile - hence, you can trim your string much earlier for the medium tile notification.

<strong>Max # of characters per line</strong> for each tile size and each font size

<!--<table>
<tr>
<th></th>
<th>TileSmall</th>
<th>TileMedium</th>
<th>TileWide</th>
<th>TileLarge</th>
</tr>
<tr>
<th>caption</th>
<td></td>
<td>63</td>
<td>134</td>
<td>82</td>
</tr>
</table>-->

<strong>TileMedium</strong>
<ul>
<li><strong>caption:</strong> 63 characters</li>
<li><strong>body:</strong> 50 characters</li>
<li><strong>base:</strong> 46 characters</li>
<li><strong>subtitle:</strong> 37 characters</li>
<li><strong>title:</strong> 34 characters</li>
<li><strong>subheader:</strong> 26 characters</li>
<li><strong>header:</strong> 19 characters</li>
</ul>

<strong>TileWide</strong>
<ul>
<li><strong>caption:</strong> 134 characters</li>
<li><strong>body:</strong> 107 characters</li>
<li><strong>base:</strong> 100 characters</li>
<li><strong>subtitle:</strong> 80 characters</li>
<li><strong>title:</strong> 73 characters</li>
<li><strong>subheader:</strong> 56 characters</li>
<li><strong>header:</strong> 41 characters</li>
</ul>

<strong>TileLarge</strong>
<ul>
<li><strong>caption:</strong> 82 characters</li>
<li><strong>body:</strong> 65 characters</li>
<li><strong>base:</strong> 60 characters</li>
<li><strong>subtitle:</strong> 49 characters</li>
<li><strong>title:</strong> 44 characters</li>
<li><strong>subheader:</strong> 34 characters</li>
<li><strong>header:</strong> 25 characters</li>
</ul>

<strong>TileSmall</strong>
<ul>
<li><strong>caption:</strong> 30 characters</li>
<li><strong>body:</strong> 24 characters</li>
<li><strong>base:</strong> 22 characters</li>
<li><strong>subtitle:</strong> 18 characters</li>
<li><strong>title:</strong> 16 characters</li>
<li><strong>subheader:</strong> 12 characters</li>
<li><strong>header:</strong> 9 characters</li>
</ul>


<h2>Limits on lines of text</h2>
The max number of lines of text that can be displayed also depends on your tile size, the device, display scaling options, and whether branding is displayed. Here are the max number of lines that can possibly be displayed for each tile size.

<strong>TileMedium/TileWide</strong>
<ul>
<li><strong>caption:</strong> 10 lines (11 without branding)</li>
<li><strong>body/base:</strong> 8 lines (9 without branding)</li>
<li><strong>subtitle:</strong> 6 lines (7 without branding)</li>
<li><strong>title:</strong> 5 lines (6 without branding)</li>
<li><strong>subheader:</strong> 3 lines (4 without branding)</li>
<li><strong>header:</strong> 2 lines (3 without branding)</li>
</ul>

<strong>TileLarge</strong>
<ul>
<li><strong>caption:</strong> 13 lines (15 without branding)</li>
<li><strong>body/base:</strong> 11 lines (12 without branding)</li>
<li><strong>subtitle:</strong> 8 lines (9 without branding)</li>
<li><strong>title:</strong> 7 lines (regardless of branding)</li>
<li><strong>subheader:</strong> 5 lines (regardless of branding)</li>
<li><strong>header:</strong> 3 lines (4 without branding)</li>
</ul>

<strong>TileSmall</strong>
<ul>
<li><strong>caption:</strong> 5 lines</li>
<li><strong>body/base:</strong> 4 lines</li>
<li><strong>subtitle:</strong> 3 lines</li>
<li><strong>title:</strong> 3 lines</li>
<li><strong>subheader:</strong> 2 lines</li>
<li><strong>header:</strong> 1 line</li>
</ul>


<h2>Use baseUri to reduce size of image URL's</h2>
If you are including images in your tile notifications, and your images have the same base URL, you can reduce the redundant leading base URL by using the baseUri property.

In the following example, all of our images are located in Assets/Apps/Weather, so we use the baseUri so that we don't have to redundantly specify this portion of the URL in every single image. We can simply specify the file name.

<div class="tabs">
<div title="XML">
<pre class="brush: xml; highlight: [2,5,9,15]">
&lt;tile&gt;
  &lt;visual displayName=&quot;Seattle&quot; baseUri=&quot;Assets/Apps/Weather/&quot;&gt;

    &lt;binding template=&quot;TileMedium&quot; branding=&quot;name&quot; hint-overlay=&quot;30&quot;&gt;
      &lt;image src=&quot;Mostly Cloudy-Background.jpg&quot; placement=&quot;background&quot;/&gt;
      &lt;group&gt;
        &lt;subgroup&gt;
          &lt;text hint-align=&quot;center&quot;&gt;Mon&lt;/text&gt;
          &lt;image src=&quot;Mostly Cloudy.png&quot; hint-removeMargin=&quot;true&quot;/&gt;
          &lt;text hint-align=&quot;center&quot;&gt;63&#176;&lt;/text&gt;
          &lt;text hint-style=&quot;captionSubtle&quot; hint-align=&quot;center&quot;&gt;42&#176;&lt;/text&gt;
        &lt;/subgroup&gt;
        &lt;subgroup&gt;
          &lt;text hint-align=&quot;center&quot;&gt;Tue&lt;/text&gt;
          &lt;image src=&quot;Cloudy.png&quot; hint-removeMargin=&quot;true&quot;/&gt;
          &lt;text hint-align=&quot;center&quot;&gt;57&#176;&lt;/text&gt;
          &lt;text hint-style=&quot;captionSubtle&quot; hint-align=&quot;center&quot;&gt;38&#176;&lt;/text&gt;
        &lt;/subgroup&gt;
      &lt;/group&gt;
    &lt;/binding&gt;

  &lt;/visual&gt;
&lt;/tile&gt;
</pre>
</div>
<div title="C# with Notifications library">
<pre class="brush: csharp; highlight: [5,19,20]">
TileContent content = new TileContent()
{
    Visual = new TileVisual()
    {
        BaseUri = new Uri("Assets/Apps/Weather", UriKind.Relative),

        TileMedium = new TileBinding()
        {
            DisplayName = "Seattle",
            Branding = TileBranding.Name,
            Content = new TileBindingContentAdaptive()
            {
                Children =
                {
                    new AdaptiveGroup()
                    {
                        Children =
                        {
                            CreateSubgroup("Mon", "Mostly Cloudy.png", "63°", "42°"),
                            CreateSubgroup("Tue", "Cloudy.png", "57°", "38°")
                        }
                    }
                }
            }
        }
    }
};

...
private static AdaptiveSubgroup CreateSubgroup(string day, string image, string highTemp, string lowTemp)
{
    return new AdaptiveSubgroup()
    {
        Children =
        {
            new AdaptiveText()
            {
                Text = day,
                HintAlign = AdaptiveTextAlign.Center
            },
            new AdaptiveImage()
            {
                Source = image,
                HintRemoveMargin = true
            },
            new AdaptiveText()
            {
                Text = highTemp,
                HintAlign = AdaptiveTextAlign.Center
            },
            new AdaptiveText()
            {
                Text = lowTemp,
                HintAlign = AdaptiveTextAlign.Center,
                HintStyle = AdaptiveTextStyle.CaptionSubtle
            }
        }
    };
}
</pre>
</div>
</div>


<h2>Don't specify attributes if you're using the default value</h2>
Tile elements have specific default values, which means that if you want the default value, there's no need to explicitly specify the value.

For example, as seen below, there's no need to specify the <em>caption</em> and disable text wrapping, since these are both default values.

<pre>
&lt;binding template=&quot;TileMedium&quot;&gt;
  &lt;text <s>hint-style=&quot;caption&quot;</s>  <s>hint-wrap=&quot;false&quot;</s>&gt;Snowboarding with Mark&lt;/text&gt;
  &lt;text hint-style=&quot;captionSubtle&quot; hint-wrap=&quot;true&quot;&gt;Fri: 9:00 AM&lt;/text&gt;
&lt;/binding&gt;
</pre>

<h1>Resources</h1>
<ul>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt185606.aspx" target="_blank">Tiles, badges, and notifications on MSDN</a></li>
<li><a title="Adaptive Tile Documentation" href="https://blogs.msdn.com/b/tiles_and_toasts/archive/2015/06/30/adaptive-tile-templates-schema-and-documentation.aspx" target="_blank">Adaptive Tile Documentation</a></li>
<li><a title="Quickstart: Sending a local tile notification" href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/10/05/quickstart-sending-a-local-tile-notification-in-windows-10/">Quickstart: Sending a local tile notification</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Quickstart: Sending an alarm in Windows 10</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/quickstart-sending-an-alarm-in-windows-10</link>
      <pubDate>Fri, 30 Sep 2016 18:47:23 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1155</guid>
      <description><![CDATA[In Windows 10 UWP, alarms are simply Toast notifications with the "alarm" scenario. And to make an...]]></description>
      <content:encoded><![CDATA[<p>In Windows 10 UWP, alarms are simply <strong>Toast notifications with the "alarm" scenario</strong>. And to make an alarm appear at a specific time, you use a <strong>scheduled Toast notification</strong>.</p>

<h3>Quick Summary</h3>
<p>If you are already familiar with sending scheduled Toast notifications, you need to do two things, (1) use the "alarm" scenario on the Toast XML content, and (2) ensure you have at least one button on your Toast, as seen below. If you're not familiar with scheduled Toasts, please read this entire quickstart.</p>

<div class="tabs">
<div title="C# with UWP Community Toolkit">
<pre class="brush: csharp; highlight: [3,5]">
ToastContent toastContent = new ToastContent()
{
    Scenario = ToastScenario.Alarm,
    Visual = new ToastVisual() { ... },
    Actions = new ToastActionsCustom() { ... }
};
</pre>
</div>
<div title="XML">
<pre class="brush: xml; highlight: [1]">
<toast scenario="alarm">

  <visual>
    ...
  </visual>

  <actions>
    ...
  </actions>

</toast>
</pre>
</div>
</div>

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/ToastAlarm.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/09/ToastAlarm.jpg" alt="ToastAlarm" width="360" height="168" class="alignnone size-full wp-image-1195" /></a>

<h3>1. Install UWP Community Toolkit NuGet package</h3>
<p>In order to create notifications via code, we strongly recommend using the UWP Community Toolkit Notifications library, which provides an object model for the notification XML content. You could manually construct the notification XML, but that is error-prone and messy. The Notifications library inside UWP Community Toolkit is built and maintained by the team that owns notifications at Microsoft.</p>

<p>Install <strong><a href="https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Notifications/">Microsoft.Toolkit.Uwp.Notifications</a></strong> from NuGet (we're using version 1.0.0 in this documentation).</p>

<h3>2. Add namespace declarations</h3>
<p>Windows.UI.Notifications includes the Tile and Toast API's.
<div class="tabs">
<div title="C# with UWP Community Toolkit">
<pre class="brush: csharp">
using Microsoft.Toolkit.Uwp.Notifications;
using Windows.UI.Notifications;
</pre>
</div>
</div>


<h3>3. Construct the notification and specify scenario "alarm"</h3>
<p>The Toast notification content includes text and images, and also buttons and inputs. Please see <a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2015/07/08/quickstart-sending-a-local-toast-notification-and-handling-activations-from-it-windows-10/">Quickstart: Sending a local toast notification and handling activations</a> to see a full code snippet.</p>

<p>To make your Toast behave like an alarm (continuous looping audio, pops full screen on Mobile), set the Scenario to Alarm as seen below. And also ensure that you have at least one button on your Toast, or else it will not be displayed as an alarm.</p>

<div class="tabs">
<div title="C# with UWP Community Toolkit">
<pre class="brush: csharp; highlight: [3,11]">
ToastContent toastContent = new ToastContent()
{
    Scenario = ToastScenario.Alarm,
    Visual = new ToastVisual()
    {
        ... (omitted)
    },
    Actions = new ToastActionsCustom()
    {
        Inputs = { ... }
        Buttons =
        {
            ... (omitted)
        }
    }
};
</pre>
</div>
</div>

<a href="https://msdnshared.blob.core.windows.net/media/2016/09/ToastAlarm.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2016/09/ToastAlarm.jpg" alt="ToastAlarm" width="360" height="168" class="alignnone size-full wp-image-1195" /></a>

<h3>4. Schedule the alarm to appear at a certain time</h3>
<p>In order to make your Toast (alarm) appear at a specific time, you will need to use a <strong>scheduled Toast notification</strong>. This is essentially just a Toast notification with a delivery time.</p>

<p>You will construct a <em>ScheduledToastNotification</em> rather than a normal <em>ToastNotification</em>, and then you will call <em>AddToSchedule</em> rather than <em>Show</em> to schedule the notification for a future time.</p>

<div class="tabs">
<div title="C# with UWP Community Toolkit">
<pre class="brush: csharp">
DateTime alarmTime = DateTime.Now.AddMinutes(1);

// Only schedule notifications in the future
// Adding a scheduled notification with a time in the past
// will throw an exception.
if (alarmTime > DateTime.Now.AddSeconds(5))
{
    // Generate the toast content (from previous steps)
    ToastContent toastContent = GenerateToastContent();

    // Create the scheduled notification
    var scheduledNotif = new ScheduledToastNotification(
        toastContent.GetXml(), // Content of the toast
        alarmTime // Time we want the toast to appear at
        );

    // And add it to the schedule
    ToastNotificationManager.CreateToastNotifier().AddToSchedule(scheduledNotif);
}
</pre>
</div>
</div>

<h3>Ensure your alarm will wake the phone from sleep</h3>
<p>In order for your scheduled Toast to show exactly at the time you specified, you need to request access to background execution. Otherwise, while the phone is in sleep mode (screen off), your Toast may be delayed for an unknown amount of time (typically 30 seconds, sometimes longer), since the phone is conserving power.</p>

<p>Simply call <em>RequestAccessAsync</em> at some point in your app (like inside your App.xaml.cs). This only needs to be called once after your app is installed, but there is no harm in calling it multiple times.</p>

<div class="tabs">
<div title="C#">
<pre class="brush: csharp;">
await BackgroundExecutionManager.RequestAccessAsync();
</pre>
</div>
</div>

<h3>Remove a scheduled alarm</h3>
<p>If a user deletes or cancels their alarm, you will need to remove the <em>ScheduledToastNotification</em> that you scheduled.</p>

<p>Simply get a list of the currently scheduled Toast notifications from <em>GetScheduledToastNotifications</em>, find the notification that you want to remove, and call <em>RemoveFromSchedule</em>.</p>

<p>Note that if the alarm has already appeared, it will NOT appear in the scheduled notifications list. Instead, you can remove an alarm that has already appeared by using <em>ToastNotificationManager.History.Remove</em>, where you can remove a Toast by its <em>Tag</em> and/or <em>Group</em>.

<div class="tabs">
<div title="C#">
<pre class="brush: csharp;">
var notifier = ToastNotificationManager.CreateToastNotifier();

// Get all scheduled notifications
var scheduled = notifier.GetScheduledToastNotifications();

// Find the one we want to remove
var toRemove = scheduled.FirstOrDefault(i => i.Id.Equals("userAlarm01"));

// And remove it
notifier.RemoveFromSchedule(toRemove);
</pre>
</div>
</div>

<h3>Scheduling recurring alarms</h3>
<p>The scheduled Toast API's do not have any recurrence options built in. That means you will have to use periodic background tasks to re-schedule your repeating alarms.</p>

<p>Here is a basic algorithm that you should use to continuously schedule your alarms.</p>

<ol>
<li>Schedule your alarms up to 5 days in advance</li>
<li>Configure a TimeTrigger background task that runs every 24 hours</li>
<li>Have that background task re-schedule the alarms up to 5 days in advance</li>
</ol>

<p>The code snippet below registers a background task that runs every 24 hours, and when the task triggers, re-schedules all the alarms. See the <a href="https://github.com/WindowsNotifications/quickstart-alarms">full code sample on GitHub</a> for more details.</p>

<p>Note that we are using the <a href="https://blogs.windows.com/buildingapps/2016/06/07/background-activity-with-the-single-process-model/#0r2Ifee5PRc5ltm8.97">Single Process Model</a> for background tasks, which is only supported in builds 14393 or newer.</p>

<div class="tabs">
<div title="C#">
<pre class="brush: csharp;">
private void RegisterPeriodicBackgroundTask()
{
    if (!BackgroundTaskRegistration.AllTasks.Any(i => i.Value.Name.Equals("DailyTask")))
    {
        var builder = new BackgroundTaskBuilder()
        {
            Name = "DailyTask"
        };

        builder.SetTrigger(new TimeTrigger(24 * 60, false)); // Every 24 hours

        builder.Register();

    }
}

protected override async void OnBackgroundActivated(BackgroundActivatedEventArgs args)
{
    var deferral = args.TaskInstance.GetDeferral();

    if (args.TaskInstance.Task.Name.Equals("DailyTask"))
    {
        // Re-schedule the notifications
        await DataModel.LoadAsync();
        DataModel.EnsureAllScheduled();
    }

    deferral.Complete();
}
</pre>
</div>
</div>

<h1>Resources</h1><ul>
<li><a title="Full code sample on GitHub" href="https://github.com/WindowsNotifications/quickstart-alarms" target="_blank">Full code sample on GitHub</a></li>
<li><a href="https://msdn.microsoft.com/en-us/library/windows/apps/xaml/mt185606.aspx" target="_blank">Tiles, badges, and notifications on MSDN</a></li>
<li><a href="https://blogs.msdn.com/b/tiles_and_toasts/archive/2015/07/02/adaptive-and-interactive-toast-notifications-for-windows-10.aspx">Interactive Toast Documentation</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>How to ensure your toast notifications continue to work when converting your win32 app into a Windows Store app using project Centennial</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/how-to-ensure-your-toast-notifications-continue-to-work-when-converting-your-win32-app-into-a-windows-store-app-using-project-centennial</link>
      <pubDate>Mon, 26 Sep 2016 05:20:39 GMT</pubDate>
      <dc:creator><![CDATA[leixu2046]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=1165</guid>
      <description><![CDATA[Note that if you follow the guidance in the latest documentation for desktop toasts, you don't need...]]></description>
      <content:encoded><![CDATA[Note that if you follow the guidance in the <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/primary-tile-apis">latest documentation for desktop toasts</a></strong>, you don't need to worry about any of this. The compat library takes care of the differences between Centennial and classic Win32.

As you may already know, developer can now bring their existing apps and games to the Windows Store with the Desktop Bridge, known as <a href="https://developer.microsoft.com/en-us/windows/bridges/desktop">project Centennial</a>.

For developers who has been integrating with toast notification features in Windows 8 and Windows 10, when you turn your app into a Windows Store app using project Centennial, you may realize that your toast notification does not work as desired - an incorrect/unresolved string will show up in Action Center at where the application title is supposed to be shown. This post summarizes on why it happens and how to fix it with a simple change to your code.
<h2>Why does it break?</h2>
In Windows 8/8.1, we enabled support for desktop Win32 apps to send local toast notifications – by enabling win32 apps to do 2 things:
<ul>
 	<li>be able to register with the notification platform and;</li>
 	<li>call WinRT APIs to send toast.</li>
</ul>
What did we do to enable those respectively?
<ul>
 	<li>A registration with notification platform requires an app identity, but win32 apps don’t really have modern app identities. This problem is solved by by allowing win32 apps to provide us with a "fake" app identity – <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh802762(v=vs.85).aspx">through creating a desktop shortcut</a>.</li>
 	<li>The app will then need to call the method overload that takes this manually created application id to indicate which identity is trying to send this notification, as shown:
<pre class="brush: csharp">ToastNotificationManager.CreateToastNotifier(appId).Show(toast);</pre></li>
</ul>


Windows Store apps converted through project Centennial on the other side, already come with proper app identities just like any regular UWP app, so if the win32 app is converted without changing any of its previous code, then it will create a conflict as below:
<ul>
 	<li>The shortcut creation will be skipped for the converted Store app during app deployment because the deployment path is different, however;</li>
 	<li>The app will still call the same overload mentioned above to pass in the fake app id that the OS can no longer resolve, since the shortcut is not there, thus results in unresolved string.</li>
</ul>
<h2>How to fix it?</h2>
Any app in this situation will need to simply change a line of their code to call
<pre class="brush: csharp">ToastNotificationManager.CreateToastNotifier().Show(toast);</pre>
without passing in the manually created appId and just let the app identity get resolved by the OS like any other modern apps do.
<h2>Why didn't we fix this for you?</h2>
The same method overload can also be used by Windows Store apps to send toast notifications on behalf of other apps in the same package. Once a win32 app is converted to Windows Store app through project Centennial, Windows just see it as a regular Store app without knowing its true intention behind calling CreateToastNotifier(appId). To prevent us from getting your real intention wrong and further break some other unexpected scenarios, we ask the developers to make the change here during your conversion process.]]></content:encoded>
    </item>
    <item>
      <title>NotificationsExtensions has moved to the UWP Community Toolkit!</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/notificationsextensions-has-moved-to-the-uwp-community-toolkit</link>
      <pubDate>Fri, 19 Aug 2016 00:21:47 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=945</guid>
      <description><![CDATA[The UWP Community Toolkit is a new open-source library that enables the developer community to...]]></description>
      <content:encoded><![CDATA[The <a href="https://blogs.windows.com/buildingapps/2016/08/17/introducing-the-uwp-community-toolkit/">UWP Community Toolkit</a> is a new open-source library that enables the developer community to collaborate and contribute new capabilities on top of the Windows SDK, including new controls, API's, and helpers for the existing SDK.

We have moved NotificationsExtensions (our helper object model for constructing XML Tile and Toast notifications) into the UWP Community Toolkit, so that the UWP Community Toolkit can become the single source for the most common and helpful libraries.

<h2>What does this mean?</h2>
<ul>
<li><strong>The NotificationsExtensions NuGet package is being deprecated.</strong> Please switch to the <a href="https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Notifications/">Microsoft.Toolkit.Uwp.Notifications</a> NuGet package for all future development.

<li style="margin-top: 1em;"><strong>The NotificationsExtensions GitHub repo is being deprecated.</strong> The code has been transitioned into the <a href="https://github.com/Microsoft/UWPCommunityToolkit">UWP Community Toolkit GitHub</a>, where all future improvements will be made. Please submit any issues or pull requests on that new repo.
</ul>

<h2>Migrating to the new library</h2>
We wanted to make sure the transition is as easy as possible, so we avoiding making any major changes from the most recent version. However, we have removed the deprecated classes and properties to keep the API surface as clean as possible. If you were using an old version of NotificationsExtensions, you might have been using some of the deprecated classes, and there might be some changes.

<h3>New NuGet package</h3>
Uninstall the current NuGet, and install the new UWP Community Toolkit Notifications NuGet package, which you can find by searching "uwp notifications", or using the full NuGet package ID: <a href="https://www.nuget.org/packages/Microsoft.Toolkit.Uwp.Notifications/">Microsoft.Toolkit.Uwp.Notifications</a>.

<h3>New namespace</h3>
Previously, we had separate namespaces for Tile and Toast (and the generic namespace for shared content). Now, this is all converged under a single Notifications namespace inside the UWP Community Toolkit.

<div class="tabs">
<div title="New Code">
<pre class="brush: csharp;">
using Microsoft.Toolkit.Uwp.Notifications;
</pre>
</div>
<div title="Old Code">
<pre class="brush: csharp;">
using NotificationsExtensions;
using NotificationsExtensions.Tiles;
using NotificationsExtensions.Toasts;
</pre>
</div>
</div>

<h3>Breaking changes before version 14332.0.0</h3>
If you weren't using version 14332.0.0 or higher of NotificationsExtensions, read <a href="https://blogs.msdn.microsoft.com/tiles_and_toasts/2016/05/23/notificationsextensions-updated-for-anniversary-update-of-windows-10/">this previous blog post</a> that discusses the breaking changes made in that version, which also apply to the UWP Toolkit version. You will need to address those changes first.

<h3>Breaking changes post-14332.0.0</h3>
We removed all of the deprecated classes and properties when switching to the new library. That means no more <em>ToastText</em> and <em>TileText</em>, since that becomes a shared <em>AdaptiveText</em>. That also means <em>ToastVisual</em> no longer has <em>TitleText</em> and other properties... it just has <em>BindingGeneric</em> now.

Here is an example of a Toast, and the changes required if you were using the deprecated classes/properties (Tiles will also require converting the respective TileText and TileImage/TileGroup/TileSubgroup elements into AdaptiveText/AdaptiveImage/AdaptiveGroup/AdaptiveSubgroup).

<div class="tabs">
<div title="New Code">
<pre class="brush: csharp;">
ToastVisual visual = new ToastVisual()
{
    BindingGeneric = new ToastBindingGeneric()
    {
        Children =
        {
            new AdaptiveText()
            {
                Text = title
            },
 
            new AdaptiveText()
            {
                Text = content
            },
 
            new AdaptiveImage()
            {
                Source = image
            }
        },
 
        AppLogoOverride = new ToastGenericAppLogo()
        {
            Source = logo,
            HintCrop = ToastGenericAppLogoCrop.Circle
        }
    }
};
</pre>
</div>
<div title="Old Code">
<pre class="brush: csharp;">
ToastVisual visual = new ToastVisual()
{
    TitleText = new ToastText()
    {
        Text = title
    },

    BodyTextLine1 = new ToastText()
    {
        Text = content
    },

    InlineImages =
    {
        new ToastImage()
        {
            Source = image
        }
    },

    AppLogoOverride = new ToastAppLogo()
    {
        Source = logo,
        Crop = ToastImageCrop.Circle
    }
};
</pre>
</div>
</div>]]></content:encoded>
    </item>
    <item>
      <title>CONTENT MOVED: Quickstart: Sending a Toast notification with custom audio</title>
      <link>https://docs.microsoft.com/archive/blogs/tiles_and_toasts/quickstart-sending-a-toast-notification-with-custom-audio</link>
      <pubDate>Sat, 18 Jun 2016 00:49:15 GMT</pubDate>
      <dc:creator><![CDATA[andrewbares7]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/tiles_and_toasts/?p=865</guid>
      <description><![CDATA[Content moved
Please see the article on docs.microsoft.com for the latest documentation.]]></description>
      <content:encoded><![CDATA[<h2>Content moved</h2>
<p>Please see <strong><a href="https://docs.microsoft.com/en-us/windows/uwp/design/shell/tiles-and-notifications/custom-audio-on-toasts">the article on docs.microsoft.com</a></strong> for the latest documentation.</p>]]></content:encoded>
    </item>
  </channel>
</rss>