如何将HubTile用于应用程序平铺

时间:2012-08-15 01:21:00

标签: c# windows-phone-7

我想在主应用程序磁贴固定到开始屏幕时添加一些动画,并想知道这是如何实现的。我已经考虑过在CreateApplicationTile()方法中创建一个HubTile,但我不知道这是否可行或者如何实现呢?有什么建议吗?

MainPage.xaml.cs中

public void CreateApplicationTile()
    {
        BitmapImage bitmap = new BitmapImage();
        bitmap.UriSource = new Uri("/Background.png", UriKind.Relative);

        HubTile tile = new HubTile
        {
            Title = "ShareSky",
            Source = bitmap

        };

        var appTile = ShellTile.ActiveTiles.First();

        if (appTile != null)
        {
            var standardTile = new StandardTileData
            {
                //Title = "ShareSky",
                ////BackgroundImage = new Uri("Images/SecondaryTileFrontIcon.jpg", UriKind.Relative),
                ////Count = 13, // any number can go here, leaving this null shows NO number
                //BackTitle = "ShareSky",
                ////BackBackgroundImage = new Uri("Images/ApplicationTileIcon.jpg", UriKind.Relative),
                //BackContent = "Click Me!"                    
            };

            appTile.Update(standardTile);
        }
    }

1 个答案:

答案 0 :(得分:0)

对于Windows Phone 7.5,这是不可能的。这是针对Windows Phone 8计划的事情