So I'm attempting to pin a secondary live tile, which gets pinned perfectly well, but it stays completely static. None of my xml shows up. This is my code:
public static async Task PinSecondaryLiveTile1(string backdrop, string poster, string name, string description, string param, Color color) { string rawxml = @" <tile> <visual branding='name'> <binding template='TileSmall'> <image placement='peek' src='%POSTER%' /> <image hint-overlay='60' placement='background' src='%BACKDROP%' /> <text hint-style='caption' hint-wrap='true' hint-align='center'>%TITLE%</text> </binding> <binding template='TileMedium'> <image placement='peek' src='%POSTER%' /> <text hint-style='body' hint-wrap='true'>%TITLE%</text> <text hint-style='captionSubtle' hint-wrap='true'>%DESCRIPTION%</text> <image hint-overlay='60' placement='background' src='%BACKDROP%' /> </binding> <binding template='TileWide'> <group> <subgroup hint-weight='25'> <image src='%POSTER%' /> </subgroup> <subgroup hint-weight='75'> <text hint-style='body' hint-wrap='true'>%TITLE%</text> <text hint-style='captionSubtle' hint-wrap='true'>%DESCRIPTION%</text> </subgroup> <subgroup > <image hint-overlay='60' placement='background' src='%BACKDROP%' /> </subgroup> </group> </binding> <binding template='TileLarge'> <image src='%POSTER%' placement='peek' /> <text hint-style='title' hint-wrap='true'>%TITLE%</text> <text hint-style='captionSubtle' hint-wrap='true'>%DESCRIPTION%</text> <image hint-overlay='60' placement='background' src='%BACKDROP%' /> </binding> </visual> </tile>"; rawxml = rawxml.Replace("%POSTER%", poster).Replace("%TITLE%", name).Replace("%BACKDROP%", backdrop).Replace("%DESCRIPTION%", description); XmlDocument xml = new XmlDocument(); xml.LoadXml(rawxml); Debug.WriteLine(rawxml); SecondaryTile secondaryTile = new SecondaryTile(); secondaryTile.Arguments = "Movie=" + param; secondaryTile.DisplayName = "The Index"; secondaryTile.Logo = new Uri("ms-appx:///Assets/Square150x150Logo.scale-150.png"); secondaryTile.TileId = "Movie=" + param; secondaryTile.TileOptions = TileOptions.ShowNameOnLogo; secondaryTile.VisualElements.ShowNameOnSquare150x150Logo = true; secondaryTile.VisualElements.ShowNameOnSquare310x310Logo = true; secondaryTile.VisualElements.ShowNameOnWide310x150Logo = true; secondaryTile.VisualElements.Square150x150Logo = new Uri("ms-appx:///Assets/Square150x150Logo.scale-150.png"); secondaryTile.VisualElements.Wide310x150Logo = new Uri("ms-appx:///Assets/Square310x150Logo.scale-150.png"); secondaryTile.VisualElements.Square310x310Logo = new Uri("ms-appx:///Assets/Square310x310Logo.scale-150.png"); secondaryTile.WideLogo = new Uri("ms-appx:///Assets/Square310x150Logo.scale-150.png"); secondaryTile.BackgroundColor = color; await secondaryTile.RequestCreateAsync(); TileUpdateManager.CreateTileUpdaterForSecondaryTile("Movie=" + param).Update(new TileNotification(xml)); } This is an example of the data I would pass:
backdrop="http://image.tmdb.org/t/p/w300/hNXfIPwexOpZXmOww6ewoihMcfN.jpg"
poster="http://image.tmdb.org/t/p/w92/6K5JOW6HmrwJnP0VILq667cspnS.jpg"
description="2016 • Science Fiction, Action, Crime, Drama • 144min"
param="5468"
Any idea what the issue is?
No comments:
Post a Comment