首页 新闻 搜索 专区 学院

如何取消磁贴的翻转?

0
悬赏园豆:10 [已解决问题] 解决于 2013-10-09 13:37

我做了款应用,主磁贴是会翻转的,但我在设置中加了个“是否翻转磁贴”的设置,可以取消磁贴的翻转,

翻转的磁贴前后都是图片:

var tile = Microsoft.Phone.Shell.ShellTile.ActiveTiles.First();
                if (tile != null)
                {
                    var tileData = new Microsoft.Phone.Shell.FlipTileData()
                    {
                        Title = "标题",
                        SmallBackgroundImage = new Uri("isostore:/Shared/ShellContent/FlipCycleTileSmall.jpg"),
                        BackgroundImage = new Uri("isostore:/Shared/ShellContent/FlipCycleTileMedium.jpg"),
                        BackBackgroundImage = new Uri("isostore:/Shared/ShellContent/FlipCycleTileMediumBack.jpg"),
                        WideBackgroundImage = new Uri("isostore:/Shared/ShellContent/FlipCycleTileLarge.jpg"),
                    };
                    tile.Update(tileData);
                }

 


但是取消翻转如何设置BackBackgroundImage 属性??

var tile = Microsoft.Phone.Shell.ShellTile.ActiveTiles.First();
                if (tile != null)
                {
                    var tileData = new Microsoft.Phone.Shell.FlipTileData()
                    {
                        Title = "标题",
                        SmallBackgroundImage = new Uri("Assets/Tiles/FlipCycleTileSmall.png", UriKind.Relative),
                        BackgroundImage = new Uri("Assets/Tiles/FlipCycleTileMedium.png", UriKind.Relative),
                        BackBackgroundImage = ?// 如何设置这个属性,使其不再翻转,设置为null,还会翻转,
                        WideBackgroundImage = new Uri("Assets/Tiles/FlipCycleTileLarge.png", UriKind.Relative),
                    };
                    tile.Update(tileData);
                }
jesse hao的主页 jesse hao | 初学一级 | 园豆:39
提问于:2013-10-07 16:16
< >
分享
最佳答案
0

设置BackBackgroundImage为一个不存在的地址:

BackBackgroundImage=new Uri("aaaa.png", UriKind.Relative),

其中aaaa.png不存在,且必须是UriKind.Relative,否则会报错,

jesse hao | 初学一级 |园豆:39 | 2013-10-09 13:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册