0
我正在尝试创建一个界面,用户可以在其中创建流向应用程序图块,“次要”图块和/或“第三级”图块的数据。然而,发生的事情是,当我更新三个图块中的一个图块时,所有图块都会使用同一个数据流进行更新......这是实时图块存在的限制,还是我错过了某些内容?不同的数据为不同的活瓷砖在同一个应用程序?
这里是我想要做的一个片段....
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;
}
只是一个通知更新它们,在'PeriodicTask'荣获使用'ShellTile.Create'没有通过市场认证。 –