摘要:<Grid x:Name="ContentGrid" Grid.Row="1" Margin="12,0,12,0"><Grid.Background><ImageBrush ImageSource="Images/BuzzAldrinOnTheMoon.png" /></Grid.Background></Grid> 阅读全文
WP7备注(18)(OpacityMask)
2011-04-28 15:50 by 血糯米Otomii, 178 阅读, 0 推荐, 收藏, 编辑
摘要:<Image Source="Images/BuzzAldrinOnTheMoon.png"Stretch="None"VerticalAlignment="Top" /><Image Source="Images/BuzzAldrinOnTheMoon.png"Stretch="None"VerticalAlignment="Top"RenderTransformOrigin="0.5 1"><... 阅读全文
WP7备注(17)(TextBlock和Inlines)
2011-04-28 14:44 by 血糯米Otomii, 553 阅读, 0 推荐, 收藏, 编辑
摘要:Code实例: TextBlock textBlock = new TextBlock();Run run = new Run();textBlock.Inlines.Add(run);Xaml实例:<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"><TextBlock FontSize="24"><Run FontFamily... 阅读全文
WP7备注(16)(Transform)
2011-04-28 14:28 by 血糯米Otomii, 314 阅读, 0 推荐, 收藏, 编辑
摘要:基本变化实例: 常用Transform的演示 <TextBlock><TextBlock.RenderTransform><ScaleTransform ScaleX="2" ScaleY="3" /></TextBlock.RenderTransform></TextBlock><TextBlock Text="Transform Experiment"HorizontalAlignment="... 阅读全文
WP7备注(15)(Resources)
2011-04-28 11:38 by 血糯米Otomii, 212 阅读, 0 推荐, 收藏, 编辑
摘要:资源存放地点: <phone:PhoneApplicationPage><phone:PhoneApplicationPage.Resources></phone:PhoneApplicationPage.Resources></phone:PhoneApplicationPage><Application><Application.Resources></Application.Resource... 阅读全文
WP7备注(14)(ContentPropertyAttribute)
2011-04-28 09:59 by 血糯米Otomii, 331 阅读, 0 推荐, 收藏, 编辑
摘要:ContentPropertyAttribute主要用于Xaml的简化. <TextBlock.Foreground><RadialGradientBrush><RadialGradientBrush.GradientStops><GradientStopCollection><GradientStop Offset="0" Color="Transparent" /><GradientStop ... 阅读全文
WP7备注(13)(独立储存)
2011-04-27 15:00 by 血糯米Otomii, 216 阅读, 0 推荐, 收藏, 编辑
摘要:IsolatedStorageSettings: public Brush BackgroundBrush { set; get; } void LoadSettings(){IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;Color clr;if (settings.TryGetValu... 阅读全文
WP7备注(12)(页面数据共享)
2011-04-27 13:27 by 血糯米Otomii, 253 阅读, 0 推荐, 收藏, 编辑
摘要:通过App实现数据共享: 数据声明: public partial class App : Application{public Color? SharedColor { set; get; }}存取数据方法:(Application.Current as App).SharedColor通过OnNavigatedFrom实现数据交互:当OnNavigatedFrom调用的时候,Navigatio... 阅读全文
WP7备注(11)(页面跳转)
2011-04-27 11:16 by 血糯米Otomii, 514 阅读, 0 推荐, 收藏, 编辑
摘要:基本跳转: 跳转至目标页面: this.NavigationService.Navigate(new Uri("/TargetPage.xaml",UriKind.Relative)); 回退: this.NavigationService.GoBack(); 因为NavigationService符合Last-In-First-Out原则,所以,当页面调用GoBack方法时候,调用此方法的页面将... 阅读全文
WP7备注(10)(Accelerometer+GeoCoordinateWatcher+Map Service)
2011-04-27 10:31 by 血糯米Otomii, 493 阅读, 0 推荐, 收藏, 编辑
摘要:Accelerometer基本设置: Library:+Microsoft.Devices.Sensors WMAppManifest.xml:+<Capability Name="ID_CAP_SENSORS" /> Accelerometer(Silverlight): Accelerometer acc = new Accelerometer();acc.ReadingChanged += ... 阅读全文