上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 1. 数据库操作使用Lock防止:InvalidOperationException“The operation cannot be performed because an operation on another thread has not been completed.”InvalidOperationException“The operation cannot be performed during a call to SubmitChangeshttp://msdn.microsoft.com/zh-cn/library/c5kehkcz(VS.80).aspx 阅读全文
posted @ 2011-11-15 18:21 jeekun 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 最近在做WP7项目的优化,总要计算间隔时间,附一段代码备忘。 阅读全文
posted @ 2011-11-10 11:36 jeekun 阅读(301) 评论(0) 推荐(0) 编辑
摘要: settings , files/folders, relation data 阅读全文
posted @ 2011-10-24 17:20 jeekun 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: The Windows Phone operating system can take actions to reduce power consumption on the device when it detects that the user or the current application is in an idle state. Depending on the type of application you are creating, you may need to disable idle detection for users or applications. This topic explains how to modify the operating system’s idle behavior. 阅读全文
posted @ 2011-10-20 16:44 jeekun 阅读(678) 评论(0) 推荐(0) 编辑
摘要: 在Sliverlight或者WPF程序中,与Textbox相比,RichTextBox提供更为强大的功能,例如支持多种文本格式,支持图文混派,内嵌控件等等,而Windows Phone在升级到Mango(7.1)后也开始支援这个控件。现在还只是Beta版,所以在功能上还有所欠缺: 只读,还不能输入编辑; Tool box中还没有添加这个控件,只能手工创建; 没有默认样式,所以得自定义样式文件; 没有Design View实时支持。 阅读全文
posted @ 2011-10-09 18:17 jeekun 阅读(571) 评论(0) 推荐(0) 编辑
摘要: 我们需要站在巨人的肩膀上来开发应用。 工具 + 巨人 + 能力 = 漂亮应用 人是发明并使用工具的动物。良好的工具对于开发Windows Phone将大大提高工作效率。本文总结了个人对于Windows Phone开发过程中比较实用的工具。至于Windows Phone 7开发必须的Visual Studio 2010和Blend,大家可以去http://create.msdn.com去下载,这里就不介绍了。 阅读全文
posted @ 2011-10-09 18:12 jeekun 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 我们平常用的都是对象的强引用,如果有强引用存在,GC是不会回收对象的。我们能不能同时保持对对象的引用,而又可以让GC需要的时候回收这个对象呢?.NET中提供了WeakReference来实现。弱引用可以让您保持对对象的引用,同时允许GC在必要时释放对象,回收内存。对于那些创建便宜但耗费大量内存的对象,即希望保持该对象,又要在应用程序需要时使用,同时希望GC必要时回收时,可以考虑使用弱引用。弱引用使用起来很简单,看下面的代码: 阅读全文
posted @ 2011-10-09 14:59 jeekun 阅读(12741) 评论(1) 推荐(2) 编辑
摘要: 转载自:http://www.cnblogs.com/sun8134/archive/2011/09/19/2181030.html 前几天看园子有篇文章介绍Visual Studio Async 觉得不错想试试效果,上MS网站下载安装包装下 地址:http://www.microsoft.com/download/en/details.aspx?id=9983 阅读全文
posted @ 2011-09-28 10:59 jeekun 阅读(1202) 评论(0) 推荐(0) 编辑
摘要: 1. Compiled QueryFunc<OfflineDataContext, int> getNewsCount = CompiledQuery.Compile((OfflineDataContext newsDB1) => (from News p in newsDB1.StoredNewsList where p.CId == cid select p).Count());int storedCurCount = getNewsCount(newsDB); 阅读全文
posted @ 2011-09-18 16:27 jeekun 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 1. 在编写Pivot中的ListBox的Item项的时候,LeftButtonDown 或者LeftButtonUp事件效果都不是很理想,都容易在滑动的时候触发。因此改为对触摸事件的处理,没有滑动则相当于点击。private Point? startPoint;private void StackPanel_ManipulationStarted(object sender, ManipulationStartedEventArgs e){ startPoint = e.ManipulationOrigin; base.OnManipulationStarted(e);}priv... 阅读全文
posted @ 2011-08-30 10:17 jeekun 阅读(300) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页