我想从直接网站创建一个带有背景图片的标准,
我在 wp8 中做的很好,但是相同的代码在 wp7 中不起作用
这是下面的代码:
void setTile(string title, string IconPath1x1, string IconPath2x2,
string IconPath4x2, string IconPath2x2Back, string IconPath4x2Back,
string wideContent, string targetUri)
{
StandardTileData Standarddata = new StandardTileData()
{
//IconPath2x2 = "http://i.imgur.com/something.png"
Title = title + "_",
BackgroundImage = new Uri(IconPath2x2, UriKind.RelativeOrAbsolute),
BackContent = "",
BackTitle = title + "_",
BackBackgroundImage = new Uri(IconPath1x1, UriKind.Absolute)
};
ShellTile tiletopin = ShellTile.ActiveTiles.FirstOrDefault(
x => x.NavigationUri.ToString().Contains(targetUri));
if (tiletopin == null)
{
ShellTile.Create(
new Uri(targetUri, UriKind.RelativeOrAbsolute), Standarddata);
}
}
我已经尝试过这个链接,但它没有工作
http://blog.safaribooksonline.com/2012/03/20/windows-phone-7-bringing-your-application-tile-to-life/
我错过了什么或者它在 wp7 中不起作用?