Windows Phone的瓷砖
来源:互联网 发布:java休眠1秒 编辑:程序博客网 时间:2024/03/29 19:11
Windows Phone的瓷砖
一个程序的超链接.
两种类型:程序Tile以及备用Tile<Phone7.1的新特性>.
三个更新方式:ShellTile APIs/PNS/SHellTileSchedule
Application Tile:
手工可以Pin产生,无须代码干预;
Secondary Tile:
程序代码Pin到Start,一个程序可以使用多个Secondary Tile,但只能有一个Application Tile.典型的场景包括天气预报/城市新闻/分类新闻,各分类均可以Pin到启动界面.
注意:
两类型的Tile,不存在任何依赖关系,看一下两者对比。
Tile type
Tile creation
Tile deletion
Tile update
Application Tile
Can be created by the user only when the user taps and holds the application name in the Application List and then selectspin to start. Properties are initially set in the Application Manifest.
Cannot be deleted. The Application Tile may or may not be pinned to Start. But even if the user has not pinned the Application Tile to Start, it can beupdated programmatically such that its property data will be fresh should the user decide to pin it.
Can be updated by:
· ShellTile APIs. The Application Tile is always the first item in the ActiveTiles collection, even if the Tile is not pinned to Start.
· Push Notifications for Windows Phone
· ShellTileSchedule APIs
Secondary Tiles
Can be created only as the result of user input in an application. The application then uses theCreate(Uri, ShellTileData) method to create a Tile on Start. Because the UI will navigate to Start when a new secondary Tile is created,only one secondary Tile can be created at a time.
Can be deleted by:
1. The user unpinning the Tile from Start.
2. Uninstalling the application.
3. Calling Delete.
Can be updated by:
· ShellTile APIs
· Push Notifications for Windows Phone
· ShellTileSchedule APIs
Tile属性:
从Phone 7.1之后,Tile具备两面Front/Back。如果Back没有任何的设置,Tile就不会自动翻转,可以通过程序设置:
正面
反面
注意:
创建Tile的Background/back-backgroud的图片必须使用本地资源,Image必须位于目录Shared\shellContent,更新时候可以使用本地或远程(Https是不支持的)的图片。
简单测试:
private void buttonIndefinite_Click(object sender,RoutedEventArgs e)
{
// Updates willhappen on a fixed interval.
SampleTileSchedule.Recurrence = UpdateRecurrence.Interval;
// Updates willhappen every hour. BecauseMaxUpdateCount is not set, the schedule will run indefinitely.
SampleTileSchedule.Interval = UpdateInterval.EveryHour;
SampleTileSchedule.RemoteImageUri = newUri(@"http://www.weather.gov/forecasts/graphical/images/conus/MaxT1_conus.png");
SampleTileSchedule.Start();
TileScheduleRunning = true;
}
//测试开始之后,需要等待一段时间才可以看到Tile图片的变化。
Whilethis sample does not have secondary Tiles, you can set up a schedule for a secondary Tile by passingthe Tile information to the ShellTileSchedule constructor. The sample belowdemonstrates how to set up a schedule for each existing 《Secondary》Tile.
- Windows Phone的瓷砖
- windows phone:Windows Phone 的数据
- Windows Phone的春天
- 任重道远的Windows Phone
- Windows Phone的生命周期
- Windows Phone的疑惑
- Windows Phone 的通信
- Windows Phone 的控件
- Windows phone 的NavigationCacheMode
- 基于Windows Phone的对讲机
- Windows Phone app的生命周期
- windows phone开发的blog
- Windows Phone 的应用程序栏
- Windows Phone WebBrowser的技巧
- Windows Phone 应用程序的全球化
- Windows Phone WebBrowser的技巧
- Windows Phone的异步模型
- Windows Phone WebBrowser的技巧
- 分享Silverlight/WPF/Windows Phone/HTML5一周学习导读(12月5日-12月11日)
- Send an image over a network using Qt
- 线性表的顺序存储结构
- .net 4.0 Dynamic
- 线性表的链式存储结构
- Windows Phone的瓷砖
- WP7中自定义按钮全局样式资源并绑定到按钮
- 栈的顺序存储表示
- 最后一次幽会последнее свидание
- ibatis.net的现状
- 栈的链式存储表示
- 总结2011年10个最重要的开源软件
- JDK中的设计模式
- 循环队列