zoukankan      html  css  js  c++  java
  • WP_3种磁贴效果设置

    private void ApplicationBarIconButton_Click_1(object sender, EventArgs e)
            {
                var tileData = new FlipTileData()
                {
                    //前面数据
                    Title = item.Name,
                    BackgroundImage = new Uri(item.Images[0], UriKind.Relative),
                    //后面数据
                    BackTitle = item.Name,
                    BackContent = item.Desc.Substring(0, 30),
                    BackBackgroundImage = new Uri(item.Images[1], UriKind.Relative),
                    //宽屏数据
                    WideBackgroundImage = new Uri(item.Images[2], UriKind.Relative),
                    WideBackBackgroundImage = new Uri(item.Images[3], UriKind.Relative),
                    WideBackContent = item.Desc.Substring(0, 50)
                };
     
                var iconData = new IconicTileData
                {
                    BackgroundColor = System.Windows.Media.Color.FromArgb(255, 195, 61, 39),
                    Count = 3,
                    IconImage = new Uri("Assets/Logo.png", UriKind.RelativeOrAbsolute),
                    Title = item.Name,
                    WideContent1 = item.Desc.Substring(0, 10),
                    WideContent2 = item.Desc.Substring(10, 15),
                    WideContent3 = item.Desc.Substring(15, 30)
                };
     
                var cycleData = new CycleTileData
                {
                    Count = 9,
                    CycleImages = new List<Uri> { 
                        new Uri(item.Images[0],UriKind.RelativeOrAbsolute),
                        new Uri(item.Images[1],UriKind.RelativeOrAbsolute),
                        new Uri(item.Images[2],UriKind.RelativeOrAbsolute),
                        new Uri(item.Images[3],UriKind.RelativeOrAbsolute)
                    },
                    SmallBackgroundImage = new Uri("Assets/Logo.png", UriKind.RelativeOrAbsolute),
                    Title = item.Name
                };
                try
                {
                    ShellTile.Create(new Uri("/ItemDetail.xaml?name=" + item.Name, UriKind.Relative), cycleData, true);
                }
                catch (Exception)
                {
                    MessageBox.Show("已经将此页面固定到桌面!");
                }
            }
  • 相关阅读:
    poj 2892 && 3468
    hdu 2444
    反素数
    poj 2406 && 1961
    Java定时器Timer的使用
    Linux环境下如何生成core文件
    Java异步CompletableFuture的使用
    Java中线程池的使用
    Linux系统添加应用服务进程的守护进程
    C++通过Webbrowser调用JavaScript
  • 原文地址:https://www.cnblogs.com/jx270/p/3852440.html
Copyright © 2011-2022 走看看