而且可以用一個人App有2個Icon係數Start Page,
真係幾得意見.......XD
Using dll
//Import the ShellTile namespace
using Microsoft.Phone.Shell;
using Microsoft.Phone.Shell;
create second icon
// Look to see whether the Tile already exists and if so, don't try to create it
again.
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x =>
x.NavigationUri.ToString().Contains("DefaultTitle=FromTile"));
// Create the Tile if we didn't find that it already exists.
if (TileToFind == null)
{
// Create the Tile object and set some initial properties for the Tile.
// The Count value of 12 shows the number 12 on the front of the Tile. Valid values are 1-99.
// A Count value of 0 indicates that the Count should not be displayed.
StandardTileData NewTileData = new StandardTileData
{
BackgroundImage = new Uri("Red.jpg", UriKind.Relative),
Title = "Secondary Tile",
Count = 12,
BackTitle = "Back of Tile",
BackContent = "Welcome to the back of the Tile",
BackBackgroundImage = new Uri("Blue.jpg", UriKind.Relative)
};
// Create the Tile and pin it to Start. This will cause a navigation to Start and a deactivation of our application.
ShellTile.Create(new Uri("/SecondaryTile.xaml?DefaultTitle=FromTile", UriKind.Relative), NewTileData);
}
again.
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x =>
x.NavigationUri.ToString().Contains("DefaultTitle=FromTile"));
// Create the Tile if we didn't find that it already exists.
if (TileToFind == null)
{
// Create the Tile object and set some initial properties for the Tile.
// The Count value of 12 shows the number 12 on the front of the Tile. Valid values are 1-99.
// A Count value of 0 indicates that the Count should not be displayed.
StandardTileData NewTileData = new StandardTileData
{
BackgroundImage = new Uri("Red.jpg", UriKind.Relative),
Title = "Secondary Tile",
Count = 12,
BackTitle = "Back of Tile",
BackContent = "Welcome to the back of the Tile",
BackBackgroundImage = new Uri("Blue.jpg", UriKind.Relative)
};
// Create the Tile and pin it to Start. This will cause a navigation to Start and a deactivation of our application.
ShellTile.Create(new Uri("/SecondaryTile.xaml?DefaultTitle=FromTile", UriKind.Relative), NewTileData);
}
沒有留言:
張貼留言