2012年3月14日

摘要: QQ和IM+都有自己的聊天页面,对于Android, Windows Phone写自己User Control更加简单。两个DataTemplates, 一个Template selector。 public class MessageBox : ContentControl { /// <summary> /// The DataTemplate to use when Message.Side == Side.ME /// </summary> public DataTemplate MeTemplate { get; set;... 阅读全文
posted @ 2012-03-14 00:03 chongf 阅读(1951) 评论(0) 推荐(3)
 

2012年3月13日

摘要: Mango版本的模拟器增加新的功能(加速器,地点和截图)。可以靠点击下图获取。那好,在这里很简单的在MainPage.xaml里将grid用canvas替代在MainPage的构造函数中获得屏幕宽度和高度的一半来放大加速的效果,在计算时,加速物体本身的半径不算加速距离。声明并实例化一个加速器对象,绑定CurrentValueChanged事件。然后就开始加速。在事件中,将三维的变化转换为二维的呈现(x,y轴),用canvas将被加速的物体在画布上展示出来。打开模拟器,选择加速器,拖动红点,来模拟倾斜和反转效果,可以看到黄点在二维的模拟器里模拟出手机三维的移动。代码下载: http://vdis 阅读全文
posted @ 2012-03-13 00:29 chongf 阅读(658) 评论(0) 推荐(0)
 

2011年8月23日

摘要: 1. remove the blank line2. remove the remaining spaces in the end of paragraph 阅读全文
posted @ 2011-08-23 22:58 chongf 阅读(91) 评论(0) 推荐(0)