deactivate ' pin to start ' on Application List page when pinning an app via code using C#?
Posted
by
Ahmed Ali
on Stack Overflow
See other posts from Stack Overflow
or by Ahmed Ali
Published on 2013-11-03T18:13:17Z
Indexed on
2013/11/04
9:54 UTC
Read the original article
Hit count: 272
c#
|windows-phone-8
i'm creating a windows phone app ,where i've put a button to pin the app to start screen , but when press and hold the app icon on application list screen i find that the pin to start option can be used
ShellTile TileToFind = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("MainPage.xaml"));
// 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("300.png", UriKind.Relative),
Title = "apptitle",
BackTitle = "title",
BackContent = "testing ",
BackBackgroundImage = null
};
// Create the Tile and pin it to Start. This will cause a navigation to Start and a deactivation of our app.
ShellTile.Create(new Uri("/MainPage.xaml", UriKind.Relative), NewTileData);
}
else {
MessageBox.Show("Already Pinned");
}
how can i disable the user from pinning the application again from application list screen
© Stack Overflow or respective owner