摘要: 首先,我先贴出测试工程的代码。随便建一个windows phone 的工程在MainPage.xaml中View Code <Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <!--Title 阅读全文
posted @ 2011-09-09 14:12 longlww 阅读(1838) 评论(4) 推荐(2)
摘要: 关于产生错误“The as operator must be used with a reference type or nullable type ('System.DateTime' is a non-nullable value type)”今天写数据转换器,需要将按照时间值显示不同的时间格式字符串。结果在Convert里发现这么写报错。 public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { DateTime time = value as 阅读全文
posted @ 2011-08-30 11:01 longlww 阅读(487) 评论(4) 推荐(0)
摘要: [Tip4] 关于错误Xap packaging failed今天我编译程序出了一个Error,Error提示:“Xap packaging failed. Object reference not set to an instance of an object ”错误原因:从磁盘删除某些文件,但并未在工程里删除此文件。具体说明:经过Clean Build 发现Solution Explorer里有我定义的一个资源文件有问题,如下如所示。我才想起来我在外面将这个文件删除了。解决方法:要是仍需使用此资源名,可以将该资源的属性中的Build Action设置为None。如果不需要此资源,直接删除此 阅读全文
posted @ 2011-08-10 13:57 longlww 阅读(358) 评论(0) 推荐(0)
摘要: [Tip3] Push Notification获取不到Uri的问题这两天学习Push Notification的相关知识。就看msdn上给的范例,范例的使用方法是先运行WP7程序,几秒钟后MPNS产生的Uri会返回到模拟器上,然后在OutPut里把Uri手工拷贝到asp.net搭的那个web环境里。我等了几分钟ChannelUriUpdated这个事件一点动静也没有。公司上网走代理,我就想会不会是代理搞的鬼,以前做symbian的网络相关的时候没少吃代理的亏(T_T),于是乎就把代理去了,结果还是得不到uri。运行实验室那个天气的例子也是uri得不到。最后找了半天原因才发现问题,原来是我的v 阅读全文
posted @ 2011-08-04 17:35 longlww 阅读(1050) 评论(2) 推荐(0)
摘要: [Tip1]在Event标签中跳转或者增加事件无法成功,并弹出“To generate an event handler the class 'XXXPage', specified by the x:Class or x:Subclass attribute, must be the first class in the file. Move the class code so that it is the first class in the file and try again. ”原因是页面的局部类没有在cs文件的最前面,按下面的代码结构进行修改。namespace P 阅读全文
posted @ 2011-07-25 17:03 longlww 阅读(1014) 评论(0) 推荐(1)