日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

WindowsPhone 7.8 Tiles 3 : 7.8的Tiles利器mangopollo

發布時間:2025/3/20 windows 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 WindowsPhone 7.8 Tiles 3 : 7.8的Tiles利器mangopollo 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

mangopollo:http://mangopollo.codeplex.com/

利用mangopollo可以讓我們在7.8方便的創建live tiles…

Mangopollo?will allow you to easily take advantage of new windows phone tiles (cyclic, flip, iconic) if your application is run from a Windows Phone 7.8 or 8 as well as new launchers if your application is run from a Windows Phone 8 while remaining compatible with windows phone 7.

安裝mangopollo可以通過nuget

PM> Install-Package Mangopollo

?

還是來看使用效果吧

首先是判斷:

//判斷是否wp8private void TestIfWP8_Click(object sender, RoutedEventArgs e){if (Utils.IsWP8){MessageBox.Show("It's a Windows Phone 8 !");}else{MessageBox.Show("It's a Windows Phone 7 !");}}

?

//判斷是否支持新的Tiles private void TestIfWP78_Click(object sender, RoutedEventArgs e) { if (Utils.CanUseLiveTiles) { MessageBox.Show("It's a Windows Phone 7.8 or sup !"); } else { MessageBox.Show("It's a Windows Phone 7 !"); } }

?

創建CycleTile:

private void CreateCycleTile_Click(object sender, RoutedEventArgs e){if (!Utils.CanUseLiveTiles){MessageBox.Show("This feature needs Windows Phone 8");return;}try{var mytile = new CycleTileData{Title = "cyclic tile",Count = 42,SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative),CycleImages = new List<Uri> {new Uri("/Assets/Image1.png", UriKind.Relative), new Uri("/Assets/Image2.png", UriKind.Relative), new Uri("/Assets/Image3.png", UriKind.Relative)}};#if ALTERNATIVE_SOLUTIONvar mytile = Mangopollo.Tiles.TilesCreator.CreateCyclicTile("cyclic tile", 42, new Uri("/Assets/logo159x159.png", UriKind.Relative), new List<Uri>() { new Uri("/Assets/Image1.png", UriKind.Relative), new Uri("/Assets/Image2.png", UriKind.Relative), new Uri("/Assets/Image3.png", UriKind.Relative) }); #endifShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20cycle%20tile", UriKind.Relative), mytile, false);}catch{MessageBox.Show("remove tile before create it again");}}private void CreateCycleTileWide_Click(object sender, RoutedEventArgs e){if (!Utils.CanUseLiveTiles){MessageBox.Show("This feature needs Windows Phone 8");return;}try{var mytile = new CycleTileData{Title = "cyclic wide tile",Count = 42,SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative),CycleImages = new List<Uri> {new Uri("/Assets/Image1.png", UriKind.Relative), new Uri("/Assets/Image2.png", UriKind.Relative), new Uri("/Assets/Image3.png", UriKind.Relative)}};#if ALTERNATIVE_SOLUTIONvar mytile = Mangopollo.Tiles.TilesCreator.CreateCyclicTile("cyclic wide tile", 42, new Uri("/Assets/logo159x159.png", UriKind.Relative), new List<Uri>() { new Uri("/Assets/Image1.png", UriKind.Relative), new Uri("/Assets/Image2.png", UriKind.Relative), new Uri("/Assets/Image3.png", UriKind.Relative) }); #endifShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20wide%20cycle%20tile", UriKind.Relative), mytile, true);}catch{MessageBox.Show("remove tile before create it again");}} ? 效果:

?

?

創建IconicTile:

private void CreateIconicTile_Click(object sender, RoutedEventArgs e) { if (!Utils.CanUseLiveTiles) { MessageBox.Show("This feature needs Windows Phone 8"); return; } ? try { var mytile = new IconicTileData { Title = "iconic tile", Count = 8, BackgroundColor = Colors.Purple, IconImage = new Uri("/Assets/logo202x202.png", UriKind.Relative), SmallIconImage = new Uri("/Assets/logo110x110.png", UriKind.Relative) }; ? #if ALTERNATIVE_SOLUTION var mytile = Mangopollo.Tiles.TilesCreator.CreateIconicTile("iconic tile", 8, Colors.Purple, new Uri("/Assets/logo202x202.png", UriKind.Relative), new Uri("/Assets/logo110x110.png", UriKind.Relative)); #endif ? ShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20iconic%20tile", UriKind.Relative), mytile, false); } catch { MessageBox.Show("remove tile before create it again"); } } ? ? private void CreateIconicTileWide_Click(object sender, RoutedEventArgs e) { if (!Utils.CanUseLiveTiles) { MessageBox.Show("This feature needs Windows Phone 8"); return; } ? try { var mytile = new IconicTileData { Title = "iconic tile", Count = 8, BackgroundColor = Color.FromArgb(255, 200, 10, 30), IconImage = new Uri("/Assets/logo202x202.png", UriKind.Relative), SmallIconImage = new Uri("/Assets/logo110x110.png", UriKind.Relative), WideContent1 = "Mangopollo Library", WideContent2 = "use Windows Phone 8 features", WideContent3 = "on Windows Phone 7 apps" }; ? #if ALTERNATIVE_SOLUTION var mytile = Mangopollo.Tiles.TilesCreator.CreateIconicTile("iconic wide tile", 8, Colors.Gray, new Uri("/Assets/logo202x202.png", UriKind.Relative), new Uri("/Assets/logo110x110.png", UriKind.Relative), "Mangopollo Library", "created by", "Rudy Huyn"); #endif ShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20wide%20iconic%20tile", UriKind.Relative), mytile, true); } catch { MessageBox.Show("remove tile before create it again"); } }

效果:

?

創建FlipTile:

private void CreateFlipTile_Click(object sender, RoutedEventArgs e) { if (!Utils.CanUseLiveTiles) { MessageBox.Show("This feature needs Windows Phone 8"); return; } ? try { var mytile = new FlipTileData { Title = "wide flip tile", BackTitle = "created by", BackContent = "Rudy Huyn", Count = 9, SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative), BackgroundImage = new Uri("/Assets/Background336x336_1.png", UriKind.Relative), BackBackgroundImage = new Uri("/Assets/Background336x336_2.png", UriKind.Relative) }; ? ? #if ALTERNATIVE_SOLUTION var mytile = Mangopollo.Tiles.TilesCreator.CreateFlipTile("wide flip tile", "created by", "Rudy Huyn", 9, new Uri("/Assets/logo159x159.png", UriKind.Relative), new Uri("/Assets/Background336x336_1.png", UriKind.Relative), new Uri("/Assets/Background336x336_2.png", UriKind.Relative)); #endif ShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20flip%20tile", UriKind.Relative), mytile, false); } catch { MessageBox.Show("remove tile before create it again"); } } ? private void CreateFlipTileWide_Click(object sender, RoutedEventArgs e) { if (!Utils.CanUseLiveTiles) { MessageBox.Show("This feature needs Windows Phone 8"); return; } ? try { var mytile = new FlipTileData { Title = "wide flip tile", BackTitle = "created by", BackContent = "Rudy Huyn", Count = 9, SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative), BackgroundImage = new Uri("/Assets/Background336x336_1.png", UriKind.Relative), BackBackgroundImage = new Uri("/Assets/Background336x336_2.png", UriKind.Relative), WideBackContent = "This is a very long long text to demonstrate the back content of a wide flip tile", WideBackgroundImage = new Uri("/Assets/Background691x336_1.png", UriKind.Relative), WideBackBackgroundImage = new Uri("/Assets/Background691x336_2.png", UriKind.Relative) }; ? #if ALTERNATIVE_SOLUTION var mytile = Mangopollo.Tiles.TilesCreator.CreateFlipTile("flip tile", "created by", "Rudy Huyn", "This is a very long long text to demonstrate the back content of a wide flip tile", 9, new Uri("/Assets/logo159x159.png", UriKind.Relative), new Uri("/Assets/Background336x336_1.png", UriKind.Relative), new Uri("/Assets/Background336x336_2.png", UriKind.Relative), new Uri("/Assets/Background691x336_1.png", UriKind.Relative), new Uri("/Assets/Background691x336_2.png", UriKind.Relative)); #endif ShellTileExt.Create(new Uri("/MainPage.xaml?msg=from%20wipe%20flip%20tile", UriKind.Relative), mytile, true); } catch { MessageBox.Show("remove tile before create it again"); } }

?

效果:

?

更新主Tile:

private void UpdateMainTile_Click(object sender, RoutedEventArgs e) { if (!Utils.CanUseLiveTiles) { MessageBox.Show("This feature needs Windows Phone 8"); return; } ? var maintile = new FlipTileData { Title = "main tile", BackTitle = "this is", BackContent = "main tile", Count = 3, SmallBackgroundImage = new Uri("/Assets/logo159x159.png", UriKind.Relative), BackgroundImage = new Uri("/Assets/Background336x336_2.png", UriKind.Relative), BackBackgroundImage = new Uri("/Assets/Background336x336_1.png", UriKind.Relative), WideBackContent = "This is a very long long text to demonstrate the back content of a wide flip tile", WideBackgroundImage = new Uri("/Assets/Background691x336_2.png", UriKind.Relative), WideBackBackgroundImage = new Uri("/Assets/Background691x336_1.png", UriKind.Relative) }; ? #if ALTERNATIVE_SOLUTION var maintile = Mangopollo.Tiles.TilesCreator.CreateFlipTile("main tile", "This is", "main tile", "This is a very long long text to demonstrate the back content of a wide flip tile", 9, new Uri("/Assets/logo159x159.png", UriKind.Relative), new Uri("/Assets/Background336x336_1.png", UriKind.Relative), new Uri("/Assets/Background336x336_2.png", UriKind.Relative), new Uri("/Assets/Background691x336_1.png", UriKind.Relative), new Uri("/Assets/Background691x336_2.png", UriKind.Relative)); #endif ShellTile.ActiveTiles.First().Update(maintile); }

?

效果:

?

?

?本文轉自 sun8134 博客園博客,原文鏈接:?http://www.cnblogs.com/sun8134/archive/2013/02/10/2909865.html? ,如需轉載請自行聯系原作者

http://www.cnblogs.com/sun8134/archive/2013/02/10/2909865.html


總結

以上是生活随笔為你收集整理的WindowsPhone 7.8 Tiles 3 : 7.8的Tiles利器mangopollo的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。