我正在创建一个 Windows Phone 应用程序,我在其中放置了一个按钮以将应用程序固定到开始屏幕,但是当按住应用程序列表屏幕上的应用程序图标时,我发现可以使用固定启动选项
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");
}
如何禁止用户从应用程序列表屏幕再次固定应用程序