wp8.1 边开发边学习记录
2015-10-14 13:16
295 查看
1. 拦截后退按钮
2. 程序退出
3.系统自带json
4.保留页面缓存
5.httpclient不读缓存
6.计时器-1
Dim WithEvents dt As DispatcherTimer = New DispatcherTimer()
Private Sub dt_Tick(sender As Object, e As Object) Handles dt.Tick
'todo
End Sub
Protected Overrides Sub OnNavigatedTo(e As Navigation.NavigationEventArgs) AddHandler HardwareButtons.BackPressed, AddressOf MainPage_BackPressed End Sub Protected Overrides Sub OnNavigatedFrom(e As NavigationEventArgs) RemoveHandler HardwareButtons.BackPressed, AddressOf MainPage_BackPressed End Sub Private Sub MainPage_BackPressed(sender As Object, e As BackPressedEventArgs) e.Handled = True //todo End Sub
2. 程序退出
Application.Current.Exit()
3.系统自带json
Imports Windows.Data.Json
4.保留页面缓存
Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. Me.NavigationCacheMode = Navigation.NavigationCacheMode.Required End Sub
5.httpclient不读缓存
Dim http As New HttpClient() http.DefaultRequestHeaders.Add("Cache-Control", "no-cache")
6.计时器-1
Dim WithEvents dt As DispatcherTimer = New DispatcherTimer()
Private Sub dt_Tick(sender As Object, e As Object) Handles dt.Tick
'todo
End Sub
相关文章推荐
- Windows phone 8 开发环境搭建
- windows phone 8 的新特性
- 选择MonoTouch而不是Objective-C开发iOS应用的5大理由
- WP8图片内存BUG解决办法
- WP8 中常用的 WriteableBitmap和BitmapImage相互转换
- BitmapImage 获取网络图片,Width和Height都为1的解决办法。
- wp8 独立存储 总结2(文件存储)
- onnavigatedto 与 onnavigatedfrom 的区别
- wp8 applicationbar 创建
- wp8 独立存储 总结3(应用设置)
- wpf 代码设置背景
- windowphone 的主题资源
- wp8 application.resources 加入
- Windows Phone 8 emulator - Something happened while creating a switch 问题解决
- Windows8下PhoneGap 4 + Android Studio 1.0 + VS2013配置指南
- 中国移动商城登陆WP8应用商店
- IDC:超过三分之一的开发者有兴趣开发WP和WIN8应用
- 亚马逊提供Lumia 920黑白红三色 合约价39.99$
- 诺基亚股价创新高,每股达4美元