1

My windows 10 UWP app has a main "dashboard" that has several listview items. I'm wanting to show content from these items in the Primary Tile. The code that I have shows the content in the tile but the tile stops flipping after a few seconds and is stuck with content from one of the listview items. How do I make sure that it doesn't stop cycling through the listview items and doesn't stop flipping.

Here's what my code looks like:

public MainPage()
{

    TileUpdateManager.CreateTileUpdaterForApplication().EnableNotificationQueue(true);

}

protected async override void OnNavigatedTo(NavigationEventArgs e)
{
    UpdateMedium(new TileBindingContentAdaptive()
            {
                Children =
                {
                    new TileText()
                    {
                        Text = "Some text from Listview item,
                        Style = TileTextStyle.Base,
                        Wrap = true
                    },
                    new TileText()
                    {
                        Text = "Some other text from the same listview item",
                        Style = TileTextStyle.CaptionSubtle,
                        Wrap = true
                    }
                }
            });
}

private void UpdateMedium(TileBindingContentAdaptive mediumContent)
{
        TileContent content = new TileContent()
        {
            Visual = new TileVisual()
            {
                Branding = TileBranding.NameAndLogo,

                TileMedium = new TileBinding()
                {
                    Content = mediumContent
                }
            }
        };

        try
        {
            TileNotification tileNotification = new TileNotification(content.GetXml());
            TileUpdateManager.CreateTileUpdaterForApplication().Update(tileNotification);
        }

        catch
        {


        }
}

Can someone point out what's wrong with my code?

Thanks.

Jason Bourne
  • 349
  • 1
  • 3
  • 14
  • 1
    There is no obvious wrong with your code. But your code will only send a normal tile notification. And it won't "flipping". When you say "flipping", do you mean the tile notification queue? If so, you can refer to [Quickstart: How to use the tile notification queue with local notifications](http://blogs.msdn.com/b/tiles_and_toasts/archive/2016/01/05/quickstart-how-to-use-the-tile-notification-queue-with-local-notifications.aspx). – Jay Zuo Feb 09 '16 at 06:02
  • 1
    If you look at my code, EnableNotificationQueue(true) is what enables that queue. I've referred to all the Quickstart articles on Tile Notifications on MSDN. By flipping, I mean the flip animation that flips through different notifications. – Jason Bourne Feb 09 '16 at 16:08
  • 1
    Have you checked this [quickstart-tile-queue sample](https://github.com/WindowsNotifications/quickstart-tile-queue)? It works well in my side. To see the "flipping", we need to send more than one notification with different `Tag`. You can have a try. – Jay Zuo Feb 10 '16 at 01:43

0 Answers0