Windows Phone 7 Tips (2)
来源:Alexis的51博客 责任编辑:栏目编辑 发表时间:2013-07-01 17:02 点击:次
上一篇Tips:Windows Phone 7 Tips (1), 今天也是分享10个Windows Phone 7 技巧,并提供离线文档下载
1. 在Windows Phone 7中最简单的操作IsolatedStorge的代码: SaveNote()将文本框内容保存到Note.txt中,Edit()读取Note.txt到文本框中
1. 在Windows Phone 7中最简单的操作IsolatedStorge的代码: SaveNote()将文本框内容保存到Note.txt中,Edit()读取Note.txt到文本框中
2. Windows Phone 7中的Orientation
分为 Portrait(竖屏)和Landscape(直屏)和PortraitOrLandscape(竖屏或横屏,在切换横竖屏时会自动切换)。并且又分为支持方向和启动方向,支持方向支持Portrait、Landscape和PortraitOrLandscape,启动方向支持Landscape、LandscapeLeft、LandscapeRight、Portrait、PortraitDown和PortraitUp
3. Windows Phone 7中常见的UI布局控件比较
Canvas:绝对定位控件,速度快,可用于游戏
Grid:网格定位控件,比较常用
StackPanel:自动定位控件,推荐使用与小区域
4. 简单叙述下Windows Phone 7中的生命周期。以下的一张图会对你有所帮助
具体的应用程序的事件及什么时候触发如下表:
Application Event | Occurs When | Your Actions |
Application_Launching | The user taps the entry for an application on the installed applications screen, and a new instance of an application is created. | Do not read application settings from the isolated storage as that will slow down the loading process; do not attempt to restore transient state. When an application launches, it should always appear as a new instance. |
Application_Activated | For this event to occur, two conditions must be met: (1) the user navigates away from your application, either by using a launcher or a chooser, or by starting another application and (2) the user then comes back to your application by either completing the launcher or chooser or using the hardware Back button. This event is not raised when an application is first launched. | The application should allow the user to continue interaction as if she had never left the application; transient state information should be restored, but the application shoul
相关新闻>>最新推荐更多>>>
热门新闻进入移动开发频道>>
|