erotavlas
erotavlas

Reputation: 4475

How do I change image for small tile - Windows Phone 8?

If standard (medium sized) tile is defined by

StandardTileData

What is it for the small tile?

(I want to change the background image of the tile based on some user setting. I'm doing it like this for the medium tile, but what is the class that defines the small tile?

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

Upvotes: 0

Views: 134

Answers (2)

Gaurav Deochakke
Gaurav Deochakke

Reputation: 2285

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

Hope this helps too.. Thanks and cheers.

Upvotes: 0

Chris Shao
Chris Shao

Reputation: 8231

You can use FlipTileDate in Windows Phone 8, there are small, medium, large tile in it.

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

Upvotes: 1

Related Questions