基础知识点:1、获取WP7的DeviceUniqueId:public string GetDeviceUniqueId(){ string strUniqueId = null; object uniqueId = DeviceExtendedProperties.GetValue("DeviceUniqueId"); if (uniqueId != null) { byte[] uniqueBytes = (byte[]) uniqueId; strUniqueId = Convert.ToBase64String(uniqueBytes); } return st..
posted @ 2012-04-13 15:15 求道2011 阅读(311) 评论(0) 推荐(0)
摘要: 1、XAML文件中配置好ListBox,在CS文件中为相应的ListBox添加ListBoxItem,如果ListBoxItem的数目较多(超过一屏显示),当拖动ListBox到底端,然后跳转到新页面并返回时ListBox会显示空白。 XAML文件: <Grid> <ListBox x:Name="MyListBox" /></Grid> CS文件:private void AddItems(){ for (int i = 0; i < 50; i++) { ListBoxItem item = new ListBoxItem(); 阅读全文
posted @ 2012-04-12 16:26 求道2011 阅读(4159) 评论(2) 推荐(0)
摘要: 1、获取屏幕范围:方法一:FrameworkElement element = Application.Current.RootVisual as FrameworkElement;if (element == null){return;}double width= element.ActualWidth;double height = element.ActualHeight;或者方法二:double width = Application.Current.Host.Content.ActualWidth;double height = Application.Current.Host.Co 阅读全文
posted @ 2011-11-05 01:07 求道2011 阅读(296) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示