摘要: http://msdn.microsoft.com/zh-cn/ff769549 阅读全文
posted @ 2012-05-04 14:43 博琼 阅读(205) 评论(0) 推荐(0)
摘要: void MainPage_Loaded(object sender, RoutedEventArgs e) { #region 回到顶部按钮 // Visual States are always on the first child of the control template FrameworkElement element = VisualTreeHelper.GetChild(viewer_hot, 0) as FrameworkElement; if (element != n... 阅读全文
posted @ 2012-04-28 18:21 博琼 阅读(423) 评论(1) 推荐(0)
摘要: <ScrollViewer x:Name="viewer_hot"> <Grid Margin="0,-60,0,0"> <Grid.RowDefinitions> <RowDefinition Height="60"/> <RowDefinition Height="Auto"/> </Grid.RowDefinit... 阅读全文
posted @ 2012-04-28 18:19 博琼 阅读(447) 评论(0) 推荐(0)
摘要: <Controls1:Pivot Grid.Row="1" ItemsSource="{Binding Items}" > <Controls1:Pivot.HeaderTemplate> <DataTemplate> <Grid> <TextBlock Margin="0,0,1,0" TextWrapping=... 阅读全文
posted @ 2012-04-28 12:14 博琼 阅读(535) 评论(0) 推荐(0)
摘要: 部分WP7开发者可能对Operation not permitted on IsolatedStorageFileStream这个错误感到疑惑,有时候操作时主要是因为IsolatedStorage中没有相应的文件夹造成,同时对于程序内部的资源结构,这里Zune123给大家说明下: IsolatedStorageFile文件是保存在\Applications\Data\程序的GUID\Data\IsolatedStore这个文件夹下的。 IsolatedStorageSettings是保存在\Applications\Data\程序的GUID\Data\IsolatedStore\_... 阅读全文
posted @ 2012-04-28 10:15 博琼 阅读(344) 评论(0) 推荐(0)
摘要: 才发现 IsHitTestVisible="False" 可以使控件不接收任何屏幕触控的手势,而是使手势向下传递。 阅读全文
posted @ 2012-04-26 16:46 博琼 阅读(776) 评论(0) 推荐(0)
摘要: Accelerometer sensor; private void ApplicationBarMenuItem_Click_2(object sender, EventArgs e) { //NavigationService.Navigate(new Uri("/Gyroscope_Test.xaml", UriKind.Relative)); sensor = new Accelerometer() { TimeBetweenUpdates = TimeSpan.FromSeconds(1) }; ... 阅读全文
posted @ 2012-04-26 11:10 博琼 阅读(275) 评论(0) 推荐(0)
摘要: 1 将系统时间转换成UNIX时间戳DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970,1,1));DateTime dtNow = DateTime.Parse(DateTime.Now.ToString());TimeSpan toNow = dtNow.Subtract(dtStart);string timeStamp = toNow.Ticks.ToString();timeStamp = timeStamp.Substring(0,timeStamp.Length - 7);2将UNIX时 阅读全文
posted @ 2012-04-16 10:57 博琼 阅读(211) 评论(0) 推荐(0)
摘要: 首先定义模板: <DataTemplate x:Key="ItemTemplate"> <Grid Width="470" Margin="0,30,0,0" Tap="Grid_Tap" x:Name="grid"> <Grid.ColumnDefinitions> <ColumnDefinition Width="370"/> <ColumnDefinition Width="100"/> & 阅读全文
posted @ 2012-04-11 13:32 博琼 阅读(481) 评论(0) 推荐(0)
摘要: public MainPage() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainPage_Loaded); }void MainPage_Loaded(object sender, RoutedEventArgs e) {} 在页面加载过程中,第一次加载时 调用 构造函数,调用一次 Loaded 事件,但是,如果该页面始终在内存中时,当导航到该页面,构造函数不在调用,但是 Loaded 事件依然会调用。 阅读全文
posted @ 2012-04-05 18:21 博琼 阅读(364) 评论(0) 推荐(0)