鸿 网 互 联 www.68idc.cn

8.0 新的瓷贴: FlipTile, CycleTile, IconicTile

来源:互联网 作者:佚名 时间:2013-12-23 15:44
与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTilePosted on [源码下载] 与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTile 作者:webabcd 介绍 与众不同 windows phone 8.0 之新的瓷贴 示例 1、演

与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTile Posted on

[源码下载]


与众不同 windows phone (36) - 8.0 新的瓷贴: FlipTile, CycleTile, IconicTile



作者:webabcd


介绍
与众不同 windows phone 8.0 之 新的瓷贴



示例
1、演示 FlipTileData 的应用
Tile/FlipTile.xaml

<phone:PhoneApplicationPage x:Class="Demo.Tile.FlipTile" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" FontFamily FontSize Foreground SupportedOrientations mc:Ignorable="d" shell:SystemTray.IsVisible

Tile/FlipTile.xaml.cs

/* * FlipTileData - 翻转瓷贴。继承了 wp7 时代的 StandardTileData * Title - 正面标题 * SmallBackgroundImage - 小图块正面背景 * BackgroundImage - 中图块正面背景 * WideBackgroundImage - 宽图块正面背景 * Count - 正面显示的 badge (徽章),范围 1 - 99 * BackTitle - 背面标题 * BackBackgroundImage - 中图块背面背景 * WideBackBackgroundImage - 宽图块背面背景 * BackContent - 中图块背面内容 * WideBackContent - 宽图块背面内容 * * 小图块大小:159 × 159 * 中图块大小:336 × 336 * 宽图块大小:691 × 336 * * 另:application icon 的大小是 100 × 100 * * 关于 Tile 的更多内容参见: * * System; using System.Windows; using Microsoft.Phone.Controls; using Microsoft.Phone.Shell; namespace Demo.Tile { FlipTile : PhoneApplicationPage { public FlipTile() { InitializeComponent(); } private void btnPin_Click(object sender, RoutedEventArgs e) { FlipTileData flipTile = new FlipTileData() { Title = , BackTitle = , BackContent = , WideBackContent = , Count = 10, SmallBackgroundImage = , UriKind.Relative), BackgroundImage = , UriKind.Relative), WideBackgroundImage = , UriKind.Relative), BackBackgroundImage = , UriKind.Relative), WideBackBackgroundImage = , UriKind.Relative), }; // 最后一个参数为是否支持宽图块 ShellTile.Create(, UriKind.Relative), flipTile, true); } } } /* 通过 xml 方式构造 flip tile 数据 <?xml version="1.0" encoding="utf-8"?> <wp:Notification xmlns:wp="WPNotification" Version="2.0"> <wp:Tile Template="FlipTile"> <wp:SmallBackgroundImage [Action="Clear"]>[small Tile size URI]</wp:SmallBackgroundImage> <wp:WideBackgroundImage Action="Clear">[front of wide Tile size URI]</wp:WideBackgroundImage> <wp:WideBackBackgroundImage Action="Clear">[back of wide Tile size URI]</wp:WideBackBackgroundImage> <wp:WideBackContent Action="Clear">[back of wide Tile size content]</wp:WideBackContent> <wp:BackgroundImage Action="Clear">[front of medium Tile size URI]</wp:BackgroundImage> <wp:Count Action="Clear">[count]</wp:Count> <wp:Title Action="Clear">[title]</wp:Title> <wp:BackBackgroundImage Action="Clear">[back of medium Tile size URI]</wp:BackBackgroundImage> <wp:BackTitle Action="Clear">[back of Tile title]</wp:BackTitle> <wp:BackContent Action="Clear">[back of medium Tile size content]</wp:BackContent> </wp:Tile> </wp:Notification> */


2、演示 CycleTile 的应用
Tile/CycleTile.xaml

<phone:PhoneApplicationPage x:Class="Demo.Tile.CycleTile" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" FontFamily FontSize Foreground SupportedOrientations mc:Ignorable="d" shell:SystemTray.IsVisible

Tile/CycleTile.xaml.cs

网友评论
<