2013-07-09 161 views
2

我有支持实时瓷砖(默认中小型)的Windows Phone 8。我用一个相当标准的代码Windows Phone中不同的大型瓷砖和中等瓷砖

var tile = ShellTile.ActiveTiles.First(); 
if (tile == null) return; 

var data = new StandardTileData {Title = "some title"}; 
data.BackgroundImage = new Uri("/Background.png", UriKind.Relative); 
data.Count = count; 
tile.Update(data); 

我想补充的大型砖支撑更新动态磁贴,但我想是不同的。我不想用计,我想呈现一些自定义文本到影像:

var data = new StandardTileData {Title = "some title"}; 
data.BackgroundImage = new Uri("path to a custom rendered image", UriKind.Relative); 
data.Count = 0; 

我的问题是,我怎么确定我的动态磁贴中(小)或大作出相应的更新?或者我如何设置瓷砖更新为完全不同的中(小)和大瓷砖?

回答

3

StandardTileData是瓦片数据的WP7特定格式。它的等效WP8是 FlipTileData其包括用于不同片大小单独的属性:

FlipTileData TileData = new FlipTileData() 
{ 
    Title = "[title]", 
    BackTitle = "[back of Tile title]", 
    BackContent = "[back of medium Tile size content]", 
    WideBackContent = "[back of wide Tile size content]", 
    Count = [count], 
    SmallBackgroundImage = [small Tile size URI], 
    BackgroundImage = [front of medium Tile size URI], 
    BackBackgroundImage = [back of medium Tile size URI], 
    WideBackgroundImage = [front of wide Tile size URI], 
    WideBackBackgroundImage = [back of wide Tile size URI], 
}; 

另见瓷砖WP8特定文档。 http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202948(v=vs.105).aspx

+0

紧密。我不想为大瓦计,只为中小 –

+0

不幸的是隐藏的计数不支持来回宽砖,替代将产生,其中包括它的图像并使用它。 –