how to check if tile exists on start screen windows phone 7.1

how to check if tile exists on start screen windows phone 7.1

is there a way to find out if live tile exists on start screen?

I've seen it once but cant find the code.


hope you can help

You check if file exists or not as follows:

            // Create secondary tile, if it is not already present
            // Look to see if the tile already exists and if so, don't try to create again.
            ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("TileID=" + sTileId));

            // Create the tile if it is not already pinned
            if (TileToFind == null)
            {
               ... your code ....
            }

Copyright © 2007-2012 www.chuibin.com Chuibin Copyright