welcome to Qijie's Blog 薛其杰

随笔分类 -  Windows Phone

Why does my ListView scroll to the top when navigating backwards?
摘要:I’ve seen a few people asking this question. They have a page which contains a ListView and when an item is selected it navigates to another page. Whe... 阅读全文
posted @ 2015-10-09 13:28 零点零一 阅读(203) 评论(0) 推荐(0)
WP8.1 实现Continuation程序(打开文件,保存文件等)
摘要:以保存文件为例首先,在项目中加入ContinuationManager.cs类,以及SuspensionManager.cs类。其次,在App.xaml.cs中,完成如下步骤:1. 添加ContinuationManager类的实例作为属性。public ContinuationManager Co... 阅读全文
posted @ 2015-07-02 16:26 零点零一 阅读(259) 评论(0) 推荐(0)
WP8.1 双击两次返回键退出程序
摘要:在实现Windows Phone上实现点按两次返回键退出程序, 一种方法是使用Coding4Fun提供的ToastPrompt, 使用方法如下:1. 安装引用, 打开Package Manager Console.输入下列命令以安装 Coding4Fun.Toolkit.ControlsInstal... 阅读全文
posted @ 2015-07-02 16:13 零点零一 阅读(296) 评论(0) 推荐(0)
获取必应壁纸
摘要:访问网址:http://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1根据上面地址的结构,我暂时研究到就三项属性有效,他们分别是1、format,非必要。我理解为输出格式,不存在或者不等于js,即为xml格式,等于js时,输出json格式;2、... 阅读全文
posted @ 2015-06-28 20:11 零点零一 阅读(1830) 评论(0) 推荐(0)
What Controls are new for windows phone 8.1
摘要:http://www.jayway.com/2014/04/08/windows-phone-8-1-for-developerswhat-controls-are-new-2/What controls are removed between version 8.0 to 8.1First we ... 阅读全文
posted @ 2015-01-21 14:16 零点零一 阅读(285) 评论(0) 推荐(0)
Windows Phone 8.1 Page transitions
摘要:original: http://www.visuallylocated.com/post/2014/06/24/Page-transitions-and-animations-in-Windows-Phone-Runtime.aspxWith the release of Windows Ph... 阅读全文
posted @ 2014-12-10 16:41 零点零一 阅读(491) 评论(0) 推荐(0)
Use XML in Windows Phone 8.0
摘要:I have an XML file stored in DataModel folder, the structure is shown as below: 1 2 3 aaaaaaaa In windows phone 8.0, ther... 阅读全文
posted @ 2014-11-24 15:54 零点零一 阅读(168) 评论(0) 推荐(0)
解决DatePicker中Appbar icon缺失
摘要:最近写了个小程序,用到了Microsoft.Phone.Controls.Toolkit里的DatePicker控件,引入以后发现AppBar里两个button的图标不显示。如下图:们是“完成”和“取消”按钮。这两个按钮的图标有默认的路径和名称,但程序中不会自动添加,需要我们手动来做:在项目中添加目录,名称为:Toolkit.Content找两张图标的图片,分别命名为:ApplicationBar.Cancel.png和ApplicationBar.Check.png,设置图片属性中的“Bulid Action”和“Copy to Output Directory”标签,如下图:设置好后,在程 阅读全文
posted @ 2014-01-05 13:29 零点零一 阅读(251) 评论(0) 推荐(0)
Windows Phone,向localdatabase中插入时间数据出现不能转换的错误
摘要:在开发一个小程序时,使用到了DateTime类型的 DBType, 当向数据库中插入一条信息时,报错说是DateTime类型不能转换。后来发现是系统给我的DateTime类型的列赋予了个初值,而这个初值在Windows Phone的数据类型中超出了最小值。解决方法:每次向数据库中插入数据时,当该列没有值时,我给它赋了一个默认值2000/1/1. 问题解决。 阅读全文
posted @ 2013-12-29 16:54 零点零一 阅读(131) 评论(0) 推荐(0)
解决在MainPage中,点击实体返回按键不能退出的问题
摘要:开发Windows Phone应用程序的时候,我在其它页面有写过这样的代码:private void btCancel_Click(object sender, EventArgs e) { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); }导致了如下问题:当经过该页面,点击Cancel返回到主页面MainPage后,再点击Back按钮,程序不会退出,而是重定向到这个页面。解决办法如下,在MainPage的OnBackKeyPress中添加如下代码... 阅读全文
posted @ 2013-12-29 16:48 零点零一 阅读(271) 评论(0) 推荐(0)
Web Browser使用技巧
摘要:无论是在桌面级开发中,还是在手机端开发中,WebBrowser都是一个经常会用到的控件。Windows Phone中的WebBrowser虽然远远没有桌面版那么强大,但依然足够应付常规用途。本文就来介绍几则Windows Phone中的WebBrowser控件的小技巧。1.显示HTML片段WebBrowser的NavigateToString方法可以用来将一段HTML片段显示在WebBrowser中。利用这个方法可以把WebBrowser当作一个增强版的RichTextBox来使用,京东商城的Windows Phone客户端在展示商品信息时就使用了这种技术。而且这种技术还有助于解决Window 阅读全文
posted @ 2013-12-26 19:26 零点零一 阅读(456) 评论(0) 推荐(0)
Windows phone emulator
摘要:http://gauravmahajan.net/2013/02/06/launch-windows-phone-8-emulator-without-launching-visual-studio-2012/ 阅读全文
posted @ 2013-08-21 14:55 零点零一 阅读(174) 评论(0) 推荐(0)
Windows Phone 8, 添加Map控件
摘要:摘要:1. 添加Map控件到程序。2. 在Map控件中显示您当前的位置。内容:首先在WMAppManifest.xml中的Capabilities选项卡中勾选如下两项:ID_CAP_MAP, ID_CAP_LOCATION在XAML中添加Map控件: 在后台代码中, 添加Convert 类使能从Windows.Devices.Geolocation; 转换到 System.Device.Location; public static class CoordinateConverter { publi... 阅读全文
posted @ 2013-08-07 08:27 零点零一 阅读(382) 评论(0) 推荐(0)
XDocument 使用
摘要:摘要:正文:1.引入XDocument的命名空间using System.Xml.Linq;2. List to XML doc //List to XML public XDocument InitDownloadData(List item) { XElement courseItemElement = new XElement("Courses", item.Select(c => new XElement("Course", new XAttribute(... 阅读全文
posted @ 2013-07-31 09:32 零点零一 阅读(1165) 评论(0) 推荐(0)
ListBox 控件单击事件
摘要:XAML: ... 阅读全文
posted @ 2013-07-30 11:58 零点零一 阅读(4370) 评论(0) 推荐(0)
设计Popup Window
摘要:设计一个Popup window, 在其中实现分享到Facebook 和Twitter 功能。popup window 名称为 ShareView.xaml, 代码如下: ... 阅读全文
posted @ 2013-07-30 08:58 零点零一 阅读(304) 评论(0) 推荐(0)
Listbox Binding ItemsSource
摘要:把List绑定到ListBox.前台绑定: ... 阅读全文
posted @ 2013-07-29 17:49 零点零一 阅读(2239) 评论(0) 推荐(0)
ListBox item Sort
摘要:将Rss内容读取到Listbox control中, 然后实现按照标题或发布日期进行排序。 private void ListItemSort(string type) { if (type == "title") { var list = ItemBox.Items.Cast().OrderBy(item => item.Title.Text).ToList(); if (ItemBox.ItemsSource != null) ... 阅读全文
posted @ 2013-07-17 17:26 零点零一 阅读(664) 评论(0) 推荐(0)
Windows Phone在模拟器中去除Debug信息
摘要:上传的图片要求不能包含debug的信息, 关于如何去掉模拟器中的debug信息:在App.xaml.cs 中, 在构造函数中, 把Application.Current.Host.Settings.EnableFrameRateCounter = true;改为:Application.Current.Host.Settings.EnableFrameRateCounter = false; 阅读全文
posted @ 2013-04-02 11:29 零点零一 阅读(146) 评论(0) 推荐(0)
Windows Phone 获取窗口大小
摘要:For Windows Phone Apps, if you have to get the windows size, first you have to wait for the page being loaded completed, then you can get the window size by Application.Current.RootVisual.RenderSize;Best Practise:In Page Constructor, add event like below: this.Loaded += MainPage_Loaded;Then in MainP 阅读全文
posted @ 2013-04-01 17:09 零点零一 阅读(176) 评论(0) 推荐(0)