08 2011 档案
摘要:1. 在编写Pivot中的ListBox的Item项的时候,LeftButtonDown 或者LeftButtonUp事件效果都不是很理想,都容易在滑动的时候触发。因此改为对触摸事件的处理,没有滑动则相当于点击。private Point? startPoint;private void StackPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e){ startPoint = e.ManipulationOrigin; base.OnManipulationStarted(e);}priv...
阅读全文
摘要:/// <summary> /// 获取软硬件信息 /// </summary> /// <returns></returns> static public string GetDeviceInfo() { string deviceName = DeviceExtendedProperties.GetValue("DeviceName").ToString(); deviceName = deviceName.Replace(" ", "-"); string manufacturer
阅读全文
摘要:原文转自:http://www.cnblogs.com/ShiningRay/archive/2005/04/11/135263.html命名规则和风格1. 类和方法名采用Pascal风格 public class SomeClass { public SomeMethod(){} } 2. 局部变量和方法参数采用camel风格 int number; void MyMethod(int someNumber) {} 3. 接口名采用I作为前缀 interface IMyInterface {..} 4. 私有成员变量采用m_作为前缀 public class SomeClass { priv
阅读全文
摘要:有关mango前版本的主题设置可见我前一篇文章:(译)创建自定义WP7主题-简单的主题实现最近开始做mango下的开发,发现以前的自定义主题方法在这里行不通了(感谢@阿甘.Net),主要的问题就是在于是否覆盖系统默认样式的问题上。做两个项目加以比较,首先新建一个7.0的项目。MainPage.xaml代码如下:<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto&qu
阅读全文
摘要:Unfortunately, in the current version of the Windows Phone 7 Silverlight framework, it is not possible to attach any command on the ApplicationBarMenuItem and ApplicationBarButton controls. These two controls appear in the Application Bar, for example with the following markup:view sourceprint?01.&l
阅读全文