我正在尝试为 Windows 8.1 应用程序创建辅助磁贴,我需要此磁贴包含所有尺寸的图像,并且所有图像都来自互联网。这是我的代码:
string dynamicTileId = selectedItem.UniqueId;
string sLogo = selectedItem.logo;
string wLogo = selectedItem.widelogo;
string lLogo = selectedItem.imagen3;
Uri logo = new Uri(sLogo);//150x10 image
Uri wideLogo = new Uri(wLogo);//310x150 image
Uri largeLogo = new Uri(lLogo);//310x310 image
string tileActivationArguments = dynamicTileId;
var secondaryTile = new SecondaryTile(dynamicTileId, selectedItem.Title, tileActivationArguments, largeLogo, TileSize.Square310x310);
secondaryTile.VisualElements.ForegroundText = ForegroundText.Light;
secondaryTile.VisualElements.BackgroundColor = Colors.CadetBlue;
secondaryTile.VisualElements.Square310x310Logo = largeLogo;
secondaryTile.VisualElements.Square150x150Logo = logo;
secondaryTile.VisualElements.Wide310x150Logo = wideLogo;
await secondaryTile.RequestCreateAsync();
当应用程序尝试使用 310x310 徽标时出现此错误:
WinRT 信息:无法使用提供的参数初始化辅助磁贴。
所有其他图像工作正常。我正在使用这张图片进行测试:http ://www.usatodayeducate.com/staging/wp-content/uploads/2013/03/310x310-0313-gapyear.jpg
如果我评论包含 310x310 徽标的行,一切正常。知道为什么会这样吗?