Question

I have a Windows Phone 7.1 app and I want to include a wide iconic tile. I found a library called MangoPollo:

http://mangopollo.codeplex.com/

I found this code within:

var tile = ShellTile.ActiveTiles.FirstOrDefault();
if (tile != null)
{
    var tileData = new FlipTileData();
    tileData.Title = "Start Debugging";

    tileData.BackContent = "switch to windows phone, we've got candy";
    tileData.BackgroundImage = new Uri("Assets/tileBackground.png", UriKind.Relative);
    tileData.BackBackgroundImage = new Uri("Assets/tileBackBackground.png", UriKind.Relative);

   tileData.WideBackContent = "switch to windows phone, we've got candy";
   tileData.WideBackgroundImage = new Uri("Assets/wideTileBackground.png", UriKind.Relative);
   tileData.WideBackBackgroundImage = new Uri("Assets/wideTileBackBackground.png", UriKind.Relative);

   tile.Update(tileData);
}

The problem is there isn't any documentation included on Codeplex for the project so I'm not sure where to insert this code (i.e. which function) to change the tile size from normal to wide.

Was it helpful?

Solution

Another way of creating Wide Tile in Windows Phone 7. Tested it and it works. Check this out.

http://www.supersmithbros.com/index.php/latest-news/93-how-to-create-a-wp8-wide-tile-in-wp7-xna

OTHER TIPS

You may call it where you want and there is no code to change tile at the user screen, because it's not allowed.

If you look in the source code, in the link to MangoPollo which you supplied, the sample code places the tile code in a button click event. So what I would do in your app, is make an option to set up this new tile (settings page, maybe?) and when the user turns this setting on, you would run the code in that event handler.

This way, the code doesn't unnecessarily execute multiple times (as it would if it were in the constructor of a page or in app.xaml.cs).

Hope this helps!

Edit:

Based on your comment then, maybe you can put it in the constructor of your first page. Maybe, then, to prevent the code from executing more than necessary, you could check the existing tile to see if it already has a WideBackgroundImage, and if it doesn't, then set it and call Update() otherwise just continue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top