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.