09 2013 档案

WP8数据存储--独立存储文件
摘要:主要的三个步骤1.调用手机的独立存储 例如:IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication()2.创建独立存储文件流 例如:IsolatedStorageFileStream location = new IsolatedStorageFileStream(nateText.Text + ".item", System.IO.FileMode.Create, storage);3.读写该文件流 例如:将独立存储文件流转化为可写流 System.IO.StreamWrit 阅读全文

posted @ 2013-09-25 16:28 MyBeN 阅读(1356) 评论(0) 推荐(1)

WP8数据存储--独立存储设置
摘要:View Code using System;using System.Collections.Generic;using System.Linq;using System.... 阅读全文

posted @ 2013-09-25 16:00 MyBeN 阅读(426) 评论(0) 推荐(0)

WP8 NavigationInTransition实现页面切换效果
摘要:NavigationInTransition这个是实现页面切换效果,而且没控件来拖,要自己手动写,将App.xaml.cs中InitializePhoneApplication()函数里的RootFrame进行修改RootFrame=new TransitionFrame();有五种动画效果1.RollTransition(卷:)2.RotateTransition(旋转 :类似(屏幕左右旋转)可设置顺时针方向,或者逆时针方向)3.SlideTransition(滑:类似(上下进去屏幕))4.SwivelTransition(旋转 :类似(屏幕前后旋转))5.TurnstileTransiti 阅读全文

posted @ 2013-09-24 11:17 MyBeN 阅读(948) 评论(0) 推荐(0)

WP8学习笔记:如何在页面显示前自动转向到其他页面
摘要:在本次修练开始之前,我们除了预设的 MainPage页面外,也另外新增了一个 Login页面,如下图示: MainPage.xaml页面长这样 Login.xaml页面长这样 因为我们的需求是要求使用者第一次使用 App时就先登入,所以我们必须在 MainPage显示之前就要强迫使用者导向到 Login页面。从我上一篇修练文章中可以看到我曾经用过 NavigationService来实作转向功能,如果你将转向的程式写在 Loaded事件 (如下程式码),那么使用者还是会先看到 MainPage的完整页面内容,然后才转向到 Login页面,虽然显示的时间非常短暂,只有 100 ... 阅读全文

posted @ 2013-09-24 10:50 MyBeN 阅读(372) 评论(0) 推荐(0)

WP8简单的计算器
摘要:... 阅读全文

posted @ 2013-09-23 10:05 MyBeN 阅读(290) 评论(0) 推荐(1)

WP8滑动条(Slider)控件的使用
摘要:1. View Code 2.namespace PhoneApp1{ public partial class Slide... 阅读全文

posted @ 2013-09-22 15:18 MyBeN 阅读(529) 评论(0) 推荐(1)

Wp8滚动区域(ScrollViewer)控件的使用
摘要:1. 2.namespace PhoneApp1{ public partial class MainPage : PhoneApplicationPage { private DispatcherTimer trmDown; private DispatcherTimer trmUp; // 构造函数 public MainPage() { InitializeComponent(); for (int i = 0; i < 30; i++) ... 阅读全文

posted @ 2013-09-22 13:58 MyBeN 阅读(584) 评论(0) 推荐(0)

C#中ToString格式大全
摘要:C货币2.5.ToString("C")¥2.50D十进制数25.ToString("D5")00025E科学型25000.ToString("E")2.500000E+005F固定点25.ToString("F2")25.00G常规2.5.ToString("G")2.5N数字2500000.ToString("N")2,500,000.00X十六进制255.ToString("X")FFformatCode 是可选的格式化代码字符串。(详细内容请搜索“ 阅读全文

posted @ 2013-09-22 09:50 MyBeN 阅读(155) 评论(0) 推荐(0)

WP8控件进度条(ProgressBar)的使用
摘要:--前台代码 --后台代码using Microsoft.Phone.Controls;using Microsoft.Phone.Shell;using PhoneFirst.Resources;using System.ComponentModel;namespace PhoneFirst{ public partial class MainPage : PhoneApplicationPage { private BackgroundWorker backgroundworker; // 构造函数 public MainP... 阅读全文

posted @ 2013-09-17 14:35 MyBeN 阅读(1345) 评论(0) 推荐(0)

silverlight计时器
摘要:引用using System.Windows.Threading;DispatcherTimer dispatchertimer = new DispatcherTimer();//创建一个新的计时器dispatchertimer.Interval = TimeSpan.FromSeconds(1);//每一秒钟发生一次dispatchertimer.Tick += new EventHandler(dispatchertimer_Tick);//dispatchertimer_Tick:一个事件,到一秒钟发生的事件dispatchertimer.Start();//开始 阅读全文

posted @ 2013-09-09 14:19 MyBeN

导航