随笔分类 -  Windows phone 7

WP7的开发相关
摘要:相信用过WPF的BitmapImage的,都在用类似这样的代码来解决文件无法删除的问题!如果看看msdn上简单的描述,可以看到这样的说明:如果 StreamSource 和 UriSource 均设置,则忽略 StreamSource 值。如果要在创建 BitmapImage 后关闭流,请将 CacheOption 属性设置为 BitmapCacheOption.OnLoad。 默认 OnDemand 缓存选项保留对流的访问,直至需要位图并且垃圾回收器执行清理为止。static class AppHelper{public static BitmapImage GetBitmapImage(s 阅读全文
posted @ 2011-05-11 19:57 大厨无盐煮 阅读(2505) 评论(0) 推荐(1)
摘要:<!--ContentPanel - place additional content here--> <Grid x:Name="ContentGrid" Grid.Row="1"> <ListBox Height="451" HorizontalAlignment="Left" Margin="9,28,0,0" Name="listBox1" VerticalAlignment="Top" Width="460 阅读全文
posted @ 2011-05-11 11:22 大厨无盐煮 阅读(496) 评论(0) 推荐(0)
摘要:WP7中默认是不支持通过编程的方法来退出程序的,这一点不像过去的WM,用一条application.exit()就可以搞定。WP7如果要退出,官方的规矩是由用户在你的程序的主页面(也就是启动时的第一个页面)按下“BACK”按键来退出。实际上你的程序要想通过Market place的认证,也只能遵循这种模式。但是作为程序开发人员,我们有必要知道的多一点,哪怕是歪门邪道,不是吗... 阅读全文
posted @ 2010-11-11 20:41 大厨无盐煮 阅读(929) 评论(1) 推荐(0)
摘要:一. 在wp7中,程序所使用内存不能超过90M, 否则会自动退出二. 如果一个page没有被释放,那么它所包含的所有控件资源都不会被垃圾收集. 在wp7中操作图像资源是很费内存的,如果内存超过90M,你的程序就挂了,而我们在XAML文件中定义的Image控件,由于属于静态资源,所以你不可能在后台CS代码中对它们进行image.source = null 操作,我试过,没有用,除非你把Image控件... 阅读全文
posted @ 2010-11-09 15:44 大厨无盐煮 阅读(2416) 评论(8) 推荐(5)
摘要:在windows phone 7 里开发的程序在运行过程中如果内存使用超过90M程序就会自动退出,但是在模拟器上没有这个限制,因此必须有方法帮助你在调试程序的时候时刻监控内存占用,否则即使在模拟器上没问题,一旦到了真机上就可能会出问题,最近在开发中我就遇到了这个问题,经过摸索,发现phone7提供了DeviceExtendedProperties可用于取得内存使用情况。办法一:在app.xaml.... 阅读全文
posted @ 2010-11-09 13:32 大厨无盐煮 阅读(724) 评论(2) 推荐(0)
摘要:WP7缺陷列表(15项):  - 没有一个标准的文件管理器  - 没有视频聊天  - 第三方应用的可用性受限  - 没有蓝牙文件传输  - 没有大容量USB存储模式  - 没有多任务处理  - 没有复制粘贴(2011年通过补丁获得)  - 只能通过Zune与电脑同步  - 音乐播放器没有均衡器  - 浏览器不支持Flash或Silverlight  - 没有Bing maps免费导航  - 没有D... 阅读全文
posted @ 2010-10-28 16:50 大厨无盐煮 阅读(314) 评论(0) 推荐(0)
摘要:简单点,下面的语句就管用:((ApplicationBarIconButton)ApplicationBar.Buttons[0]).isEnabled = false; ((ApplicationBarIconButton)ApplicationBar.Buttons[1]).isEnabled = false;((ApplicationBarIconButton)ApplicationBar.... 阅读全文
posted @ 2010-10-28 16:46 大厨无盐煮 阅读(369) 评论(0) 推荐(0)
摘要:对于Silverlight程序,可以使用下面的方法模拟1. 使用DispatcherTimer. System.Windows.Threading.DispatcherTimer dpt = new System.Windows.Threading.DispatcherTimer(); dpt.Interval = new TimeSpan(0, 0, 1); dpt.Tick += new Ev... 阅读全文
posted @ 2010-10-25 17:15 大厨无盐煮 阅读(899) 评论(2) 推荐(0)
摘要:在windows phone7上, Isolated storage相当于一个程序的独立存储区,只能供本程序使用,而不允许别的程序访问。从开发上来说,以前的windows mobile程序安装后,在手机的资源管理器里能看到程序安装目录下的所有文件,包括你自己的一些资源文件,资源图像等等,就像PC上一样,但是在phone7上,没有办法可以看到这些文件,因为这些文件在工程Build的时候以Conten... 阅读全文
posted @ 2010-10-22 14:41 大厨无盐煮 阅读(825) 评论(1) 推荐(0)
摘要:Books & Reference eReaderFictionNon-fictionReferenceBusinessEntertainmentFinanceGames Action & AdventureBoard & ClassicCard & CasinoFamilyMusicPuzzle & TriviaShooter Sports & R... 阅读全文
posted @ 2010-10-22 13:59 大厨无盐煮 阅读(208) 评论(0) 推荐(0)
摘要:有时候我们需要让程序自己知道运行在模拟器上还是真实设备上,可以用下面代码实现:bool IsInEmulator = Microsoft.Devices.Environment.DeviceType == DeviceType.Emulator; 阅读全文
posted @ 2010-10-22 13:55 大厨无盐煮 阅读(265) 评论(0) 推荐(0)
摘要:XNA Game Studio 4.0 is a game development product that Microsoft built on top of Microsoft Visual Studio 2010 and includes in the Windows Phone Developer Tools, giving game developers the power and si... 阅读全文
posted @ 2010-09-20 17:48 大厨无盐煮 阅读(332) 评论(0) 推荐(0)
摘要:http://dev.yesky.com/329/11502829.shtml新浪围脖@WPMind.com v0.1是由WPMind.com开发的第一个Windows Phone 7上的软件作品,即新浪微博客户端。它也应该是国内第一款Windows Phone 7上的新浪微博客户端。在接下来的一系列文章中,我将带领大家探讨探讨该软件开发过程中遇到的各种问题。(1) 环境准备作为一个开发人员,我很... 阅读全文
posted @ 2010-09-18 23:57 大厨无盐煮 阅读(740) 评论(1) 推荐(0)
摘要:http://rongchaua.net/blog/windows-phone-passing-arguments-between-pages-and-input-scope/On my serie of posts for developing on Windows Phone, today I would like to illustrate how I can pass arguments ... 阅读全文
posted @ 2010-09-18 23:54 大厨无盐煮 阅读(309) 评论(0) 推荐(0)
摘要:http://rongchaua.net/blog/windows-phone-audio-recorder/Audio recorder is a typical application of a mobile phone. Man can use it to record audio from microphone and use it for his ring phone, store au... 阅读全文
posted @ 2010-09-18 23:52 大厨无盐煮 阅读(758) 评论(0) 推荐(0)
摘要:http://rongchaua.net/blog/windows-phone-7-simple-database-example/Today when I start to play around with developing on Windows Phone 7, I would like to write a first small database application because... 阅读全文
posted @ 2010-09-18 23:41 大厨无盐煮 阅读(413) 评论(0) 推荐(0)
摘要:http://silverlight.codeplex.com/releases/view/52297Silverlight for Windows Phone Toolkit offers developers additional controls for Windows Phone application development, designed to match the rich use... 阅读全文
posted @ 2010-09-18 23:36 大厨无盐煮 阅读(223) 评论(0) 推荐(0)
摘要:http://msdn.microsoft.com/en-us/library/ff637516(VS.92).aspxWhat’s New in Windows Phone Developer Tools The following table lists what’s new in WindowsPhoneDeveloperTools for RTM.ItemDescr... 阅读全文
posted @ 2010-09-18 23:08 大厨无盐煮 阅读(307) 评论(0) 推荐(0)
摘要:http://www.jeff.wilcox.name/2010/08/performanceprogressbar/The ProgressBar template for Silverlight that is built into the Windows Phone today has a negative performance cost in ‘indeterminate&#... 阅读全文
posted @ 2010-09-18 22:59 大厨无盐煮 阅读(819) 评论(2) 推荐(0)
摘要:http://blogs.msdn.com/b/priozersk/archive/2010/08/30/creating-list-picker-for-wp7.aspxFor the application that I am working on right now I needed a control that would allow a user to select a single i... 阅读全文
posted @ 2010-09-18 22:57 大厨无盐煮 阅读(419) 评论(0) 推荐(0)