Windows phone 7 同一应用程序中不同活动磁贴的不同数据?
我正在尝试创建一个界面,用户可以在其中创建数据流到应用程序磁贴、“二级”磁贴和/或“三级”磁贴。然而,当我更新三个分片中的一个时,所有的分片都使用相同的数据流更新。。。这是对活动瓷砖的限制,还是我遗漏了什么 这是我想做的一小段Windows phone 7 同一应用程序中不同活动磁贴的不同数据?,windows-phone-7,live-tile,Windows Phone 7,Live Tile,我正在尝试创建一个界面,用户可以在其中创建数据流到应用程序磁贴、“二级”磁贴和/或“三级”磁贴。然而,当我更新三个分片中的一个时,所有的分片都使用相同的数据流更新。。。这是对活动瓷砖的限制,还是我遗漏了什么 这是我想做的一小段 ShellTile tile = null; StandardTileData tileData = null; switch (tileInfo.type) {
ShellTile tile = null;
StandardTileData tileData = null;
switch (tileInfo.type)
{
case "Application":
tile = ShellTile.ActiveTiles.First();
tileData = new StandardTileData
{
BackBackgroundImage = new Uri(isoStoreTileImage, UriKind.Absolute)
};
// If the file already exists, update it.
if (tile != null)
{
tile.Update(tileData);
}
break;
case "Secondary":
tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("Secondary"));
tileData = new StandardTileData
{
BackgroundImage = new Uri(isoStoreTileImage, UriKind.Absolute)
};
// If the file already exists, update it.
if (tile != null)
{
tile.Update(tileData);
}
else
{
// Otherwise, create a new tile.
ShellTile.Create(new Uri(tileInfo.uri, UriKind.Relative), tileData);
}
break;
case "Tertiary":
tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("Tertiary"));
tileData = new StandardTileData
{
BackgroundImage = new Uri(isoStoreTileImage, UriKind.Absolute)
};
// If the file already exists, update it.
if (tile != null)
{
tile.Update(tileData);
}
else
{
// Otherwise, create a new tile.
ShellTile.Create(new Uri(tileInfo.uri, UriKind.Relative), tileData);
}
break;
}
您对所有3个
StandardTileData
实例使用相同的isoStoreTileImage
变量。这意味着您将覆盖相同的图像
Wild guess说您对所有3个分幅使用相同的图像URI,因此使用相同的数据更新它们;-) 使用
ShellTile.Create
在period中创建一个通知任务将无法通过市场认证。