Note that there are some explanatory texts on larger screens.

plurals
  1. POUpdate tile image from web source - windows 8 app
    primarykey
    data
    text
    <p>Windows 8 app - metro app - Hi I want update tile image from web but I can not get it to work. I use this <a href="http://code.msdn.microsoft.com/windowsapps/Tile-Update-every-minute-68dbbbff" rel="nofollow">Link</a> I only made some small customization but image from web not working for me. I have image in string src1 , if I use <strong>const string src1 = "ms-appx:///Assets/clock24x24.png";</strong> then image working but from web it not working. Does anyone have some idea?</p> <pre><code>public static void CreateSchedule() { var tileUpdater = TileUpdateManager.CreateTileUpdaterForApplication(); var plannedUpdated = tileUpdater.GetScheduledTileNotifications(); DateTime now = DateTime.Now; DateTime planTill = now.AddHours(4); const string src1 = "http://cdn.thenextweb.com/wp-content/blogs.dir/1/files/2012/02/Screen-Shot-2012-02-21-at-4.48.56-PM.png"; DateTime updateTime = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, 0).AddMinutes(1); if (plannedUpdated.Count &gt; 0) updateTime = plannedUpdated.Select(x =&gt; x.DeliveryTime.DateTime).Union(new [] { updateTime }).Max(); string xml = "&lt;tile&gt;" + "&lt;visual&gt;" + "&lt;binding template='TileWideImageAndText01'&gt;" + "&lt;text id='1'&gt;This tile notification uses web images&lt;/text&gt;" + "&lt;image id='1' src='" + src1 + "' alt='Web image'/&gt;" + "&lt;/binding&gt;" + "&lt;binding template='TileSquareImage'&gt;" + "&lt;image id='1' src='" + src1 + "' alt='Web image'/&gt;" + "&lt;/binding&gt;" + "&lt;/visual&gt;" + "&lt;/tile&gt;"; var tileXmlNow = string.Format(xml); XmlDocument documentNow = new XmlDocument(); documentNow.LoadXml(tileXmlNow); tileUpdater.Update(new TileNotification(documentNow) { ExpirationTime = now.AddMinutes(1) }); for (var startPlanning = updateTime; startPlanning &lt; planTill; startPlanning = startPlanning.AddMinutes(1)) { Debug.WriteLine(startPlanning); Debug.WriteLine(planTill); try { var tileXml = string.Format(xml); XmlDocument document = new XmlDocument(); document.LoadXml(tileXml); ScheduledTileNotification scheduledNotification = new ScheduledTileNotification(document, new DateTimeOffset(startPlanning)) { ExpirationTime = startPlanning.AddMinutes(1) }; tileUpdater.AddToSchedule(scheduledNotification); } catch (Exception e) { } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload