如何在Windows Phone 8上使用c#添加CycleTile磁贴?

时间:2013-02-08 09:00:07

标签: c# windows-phone-8

我有以下代码在Windows Phone 8上添加磁贴,但我无法显示磁贴。

CycleTileData cycletile = new CycleTileData();
cycletile.Title = "Test";
cycletile.SmallBackgroundImage = new Uri(root.data[0].user.profile_picture,UriKind.RelativeOrAbsolute); 

1 个答案:

答案 0 :(得分:0)

您需要使用ShellTile.Create()将图块添加到开始屏幕。设置CycleImages属性也不会受到伤害。

List<Uri> list = [your image list];
Uri smallImage = [your image];

CycleTileData tileData = new CycleTileData() 
{ 
    Title = group.Title, 
    SmallBackgroundImage = smallImage
    CycleImages = list 
 }; 

 ShellTile.Create(new Uri(NavSource, UriKind.Relative), tileData, true); 

Microsoft Dev CenterWindows Phone Geek

上有很多样本