如何更改小图块的图像 - Windows Phone 8?

时间:2014-05-28 03:39:49

标签: c# windows-phone-8

如果标准(中等大小)图块由

定义
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);

2 个答案:

答案 0 :(得分:1)

您可以在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);

答案 1 :(得分:0)

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;
}

希望这也有帮助.. 谢谢和欢呼。