如何更改小互动程序的图像-Windows Phone 8

本文关键字:图像 -Windows Phone 程序 何更改 | 更新日期: 2023-09-27 18:05:41

如果定义了标准(中等大小(瓦片

StandardTileData

小瓷砖是什么?

(我想根据一些用户设置更改互动程序的背景图像。我这样做是为了中等瓦片,但定义小瓦片的类是什么?

StandardTileData newTileData = new StandardTileData();
newTileData.BackgroundImage = new Uri("appdata:AppIcon_final.png");
newTileData.BackBackgroundImage = new Uri("", UriKind.Relative);
ShellTile appTile = ShellTile.ActiveTiles.First();
appTile.Update(newTileData);

如何更改小互动程序的图像-Windows Phone 8

您可以在Windows Phone 8中使用FlipTileDate,其中有small, medium, large磁贴。

FlipTileData flipTileData = new FlipTileData() 
{
    Title = title,
    Count = count,
    BackTitle = backTitle,
    BackContent = backContent,
    SmallBackgroundImage = smallBackgroundImage,
    BackgroundImage = backgroundImage,
    BackBackgroundImage = backBackgroundImage,
    WideBackgroundImage = wideBackgroundImage,
    WideBackBackgroundImage = wideBackBackgroundImage,
    WideBackContent = wideBackContent
};
appTile.Update(flipTileData);
private ShellTileData CreateIconicTileData()
{
    IconicTileData iconicTileData = new IconicTileData();
    iconicTileData.Count = 11;
    iconicTileData.IconImage = new Uri("/Assets/pizza.lockicon.png", UriKind.Relative);
    iconicTileData.SmallIconImage = new Uri("/Assets/pizza.lockicon.png", UriKind.Relative);
    iconicTileData.WideContent1 = "Wide content 1";
    iconicTileData.WideContent2 = "Wide content 2";
    iconicTileData.WideContent3 = "Wide content 3";
    return iconicTileData;
}

希望这也有帮助。。谢谢并欢呼。