在 Windows Phone 8 中,我能够使用以下内容创建 Shell Tile:
StandardTileData newTileData = new StandardTileData
{
BackgroundImage = new Uri("/Images/my_tile_medium.png", UriKind.Relative),
Title = "My Tile Title",
BackTitle = "My Tile Back",
BackBackgroundImage = new Uri("/Images/my_tile_medium_back.png", UriKind.Relative),
};
ShellTile.Create(MyAppPages.MainPage("Name=MyAppTile"), newTileData);
这在 Windows Phone 8.1 中不再有效。如何使用 Windows Phone 8.1 以编程方式创建磁贴
在 WP8.1 运行时你可以使用次要瓷砖, 例如:
SecondaryTile tileData = new SecondaryTile()
{
TileId = "MyTileID",
DisplayName = "MyTilesTitle",
Arguments = "Some arguments"
};
tileData.VisualElements.Square150x150Logo = new Uri("uri to image");
tileData.VisualElements.ShowNameOnSquare150x150Logo = true;
await tileData.RequestCreateAsync();
您还可以找到一些指南在 MSDN 上.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)