2013-09-30 30 views

回答

0

無論通知類型是什麼,只要您收到通知,就可以更新您的磁貼。

首先,您只需動態創建您的應用程序磁貼,或者您只需讓用戶將您的應用程序固定在開始屏幕上即可。

而當你收到通知,解析數據,並使用此代碼更新您的瓷磚

ShellTile TileToFind = ShellTile.ActiveTiles.First(); 

      StandardTileData NewTileData = new StandardTileData 
      { 
       BackgroundImage = new Uri(string_url_of_your_image, UriKind.RelativeOrAbsolute), 
       Count =int_NotificationCount, 
       BackTitle = string_title, 
       BackContent = string_content, 

      }; 

      TileToFind.Update(NewTileData); 

檢查這一點,希望這會幫助你。 謝謝。

+0

Noorul,謝謝你的回覆。 但是,當我收到平鋪通知時,我將如何收到通知?因爲我沒有看到任何事件的瓦片通知,如我們有「ToastToastNotificationReceived」事件的吐司通知。 –

+0

你好你試過這個,'pushChannel.HttpNotificationReceived + = new EventHandler (PushChannel_HttpNotificationReceived); '在推送通道註冊後創建這個事件,讓我這個事件在瓦片通知到達時觸發。在這裏,該事件'私人無效PushChannel_HttpNotificationReceived(對象發件人,HttpNotificationEventArgs e) {//在這裏做你的stuf}' – Noorul

+0

嗨@Pushpen其實在我的應用程序中我使用原始通知,我得到這個PushChannel_HttpNotification觸發,我正在舉杯祝酒通知那裏和瓷磚更新在那個事件。 – Noorul

相關問題