2012-06-11 50 views
4

我正試圖在我的地鐵應用程序活動圖塊中禁用徽標,以便我的圖塊通知中的最後一行文字顯示出來。 Windows 8 documentation 表示有一種方法可以在Package.appxmanifest文件中禁用此徽標。但是,它沒有指定如何。我已在.appxmanifest中設置了ShortName,並且我還將「顯示名稱」字段設置爲「所有徽標」;但是,默認徽標仍會出現在實時拼貼畫的左下角,並遮蓋我的拼貼圖通知中文本的最後一行。有任何想法嗎?如何在Windows 8 metro app live tile中禁用徽標?

回答

4

一個活生生的瓷磚可以有一個圖像,文本或無品牌。默認值爲應用程序徽標,當您通過指定品牌「無」來創建實時磁貼更新時,您可以覆蓋此設置,如下所示:

var templateContent = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideImage); 
    var imageElement = (XmlElement) templateContent.GetElementsByTagName("image").Item(0); 
    imageElement.SetAttribute("src", string.Concat(imagePath, "wide_tile.png")); 

    var bindingElement = (XmlElement) templateContent.GetElementsByTagName("binding").Item(0); 
    bindingElement.SetAttribute("branding", "none"); 

    var tile = new TileNotification(templateContent); 
    TileUpdateManager.CreateTileUpdaterForApplication().Update(tile); 
相關問題