
Windows Phone
jameszhouhvs
WinForm > ASP.NET > MVC > Silverlight > WP > Xamarin > .NET Core > .NET
展开
-
VS2015 - WP8.1 app project with Microsoft VCLibs reference problem
Problem:I have an old Windows Universal app (Windows 8.1 + Windows Phone 8.1) developed by VS2013 and both the project uses SQLite which depends on Microsoft.VCLibs. While in on new PC with Win10 + VS原创 2015-10-20 20:07:38 · 2076 阅读 · 0 评论 -
Xaml - Be careful of binding with ContextMenu
Header="{Binding Source={StaticResource LocalizedStrings}, Path=LocalizedResources.Conference_Details}"/>原创 2014-04-04 18:09:59 · 997 阅读 · 0 评论 -
Windows Phone 8 模拟器 - 访问localhost Web 服务
Windows Phone 8 模拟器采用Hyper-V 虚拟化, 使用localhost访问服务时,localhost指向的是模拟器本身原创 2014-04-16 17:14:24 · 1533 阅读 · 0 评论 -
how to use Task to represent the old Begin/End async methods
Reference and Example:http://stackoverflow.com/questions/14098258/taskfactory-fromasync-with-begingetrequeststream-endgetrequeststream-hangs/14098942#14098942Reference:TaskFactory.FromAsync - http://m原创 2014-02-10 16:58:08 · 1122 阅读 · 0 评论 -
Notes for using sqlite in WP8
Notes for using sqlite in WP8 project:1. install "Precompiled Binaries for Windows Phone 8" from http://www.sqlite.org/download.html2. in VS, add reference to "sqlite windows phone runtime"3. Install原创 2014-02-09 17:01:47 · 1627 阅读 · 0 评论 -
Windows Phone Deployment Error - "Deployment optimization failed due to an invalid assembly"
my solution structure is below: -UI Project (ARM) - reference to http://www.nuget.org/packages/microsoft.bcl.compression (so need to target ARM or x86 only, no AnyCPU) -PCL Project (AnyCpu)s原创 2014-02-07 15:30:18 · 2256 阅读 · 0 评论 -
Visual Studio / MSBuild - 编译时根据编译条件动态引用项目及复制重命名编译输出文件
项目需求1:主程序需要引用一个资源项目,根据编译配置 Visual Stuido中的Configuration Manager的不同,选择引用不同的资源项目可在项目文件.csproj中添加如下内容: {7A3F6F20-D083-4B7C-8B17-8091CDE95E20} TargetLanguageThai原创 2013-11-29 00:07:27 · 4705 阅读 · 0 评论 -
Xaml - 给ItemsControl加上滚动条
ItemsControl是一个基础类型,控件本身没有内置滚动条。如果不喜欢ListBox默认的复制样式,只是需要一个简单的可滚动Items Control,可以给ItemsControl的Template加一个ScrollViewer:原创 2013-12-09 16:32:46 · 5984 阅读 · 0 评论 -
WP7 - 返回键: 如何判断页面是由返回键加载
<br />继续上一篇说wp7的返回键,用户通过返回键返回到前一页面时,当页面加载时,如何判断是由返回键加载,还是第一次加载? 两种加载的区别在于: 由返回键加载的页面,并不触发该页面的构造函数 - 剩下的判断方法就很简单了原创 2010-12-02 14:15:00 · 2375 阅读 · 2 评论 -
Windows Phone - 引用图片资源的方式可能会影响图片显示质量
问题:有一个图片资源采用的BuildAction 为Resource方式,图片文件大小为512x512, 在程序中使用如下:Image Source="/MyApp;component/Assets/Images/lock-yellow.png" Stretch="Uniform" Width="50" Height="50"/>程序运行时,图片明显出现了锯齿现象,即使是从512缩放的50。原创 2013-10-28 17:11:20 · 1373 阅读 · 0 评论 -
使用Hammock实现Tumblr xAuth
纠结与Tumblr 的xAuth好几天了,最终发现还是Hammock的rest类库好用,oauth签名什么的都帮你做了xAuth代码:Hammock.RestClient restClient = new Hammock.RestClient { Authority = "https://www.tumblr.com/",原创 2012-07-03 11:49:02 · 2198 阅读 · 0 评论 -
Link - Windows Universal App - Email/SMS/Share
Email - http://mobileosgeek.com/windows-phone-8-1-and-windows-runtime-apps-how-to-2-send-emails-with-attachment-in-wp-8-1/原创 2014-07-10 18:00:06 · 929 阅读 · 0 评论 -
Link - Windows Universal App - Open Url/Rate the App/MessageDialog
Launch Url - http://msdn.microsoft.com/en-us/library/windows/apps/hh701484.aspx原创 2014-07-10 19:07:23 · 982 阅读 · 0 评论 -
Link - Windows Universal App - AppBar
Link - http://www.jayway.com/2014/04/09/windows-phone-8-1-for-developers-application-bar/AppBarButton.Icon Symbols原创 2014-07-10 17:06:28 · 876 阅读 · 0 评论 -
WinRT - Disable WebView's scrollbar and allow itself scroll able within a ScrollViewer
I have a page with a WebView and some long content under the WebView, so I need 1. disable the WebView's scrollbar async void webView_NavigationCompleted(WebView sender, WebViewNavigationCompletedEve原创 2015-03-05 17:13:22 · 949 阅读 · 0 评论 -
LINK - Setup Azure Mobile Service for existing Azure Sql database
LINK - http://blogs.msdn.com/b/jpsanders/archive/2013/05/24/using-an-existing-azure-sql-table-with-windows-azure-mobile-services.aspxThere are a couple of requirements for using an Azure SQL table sea原创 2015-02-12 23:18:49 · 729 阅读 · 0 评论 -
JSON.NET PCL - MongoDB date json deserialization
Use a customized JsonConverter to handle deserilizatrion the MongoDb based datetime json"Submitted" : { "$date" : 1413030537700 }the converter:public class MongoDateConverter : JsonConverter {原创 2014-10-20 17:25:32 · 1194 阅读 · 0 评论 -
LINK - Windows Universal App in-app purchase
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn632430.aspx原创 2014-09-03 19:14:13 · 964 阅读 · 0 评论 -
LINK - Windows Universal - 消息推送
Lhttp://stackoverflow.com/questions/20753313/device-not-receiving-c-sharp-windows-push-notifications-because-channel-url-inco原创 2014-08-29 18:57:36 · 849 阅读 · 0 评论 -
Link - WinRT - page cache mode on navigation
LINK - http://mikaelkoskinen.net/winrt-navigation-cache-or-why-going-back-to-previous-page-creates-a-new-instance-of-the-page/原创 2014-08-25 21:29:24 · 920 阅读 · 0 评论 -
LINK - WinRT - WebView
Debug JS - http://www.jonathanantoine.com/2013/04/05/win8-xaml-app-how-to-debug-the-javascript-in-a-webview/原创 2014-08-13 17:10:54 · 940 阅读 · 0 评论 -
LINK - WinRT:加密解密应用数据
https://gist.github.com/thomaslevesque/5652991转载 2014-08-06 16:06:23 · 1164 阅读 · 0 评论 -
LINK - WinRT: get unique device id
http://blogs.microsoft.co.il/iblogger/2012/12/11/how-to-get-a-unique-device-id-in-winrt-c/原创 2014-08-06 15:17:32 · 966 阅读 · 0 评论 -
LINK - Windows Universal App - background media
How to play audio in the background http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj841209.aspx原创 2014-07-14 14:50:46 · 918 阅读 · 0 评论 -
WP7 - RestSharp + JSON Http Post
wp7应用中使用RestSharp提交到使用json格式的 http post api,折腾了半天发现,用RestRequest.AddParameter方法添加类型为body的参数不可行:RequestBodyIf this parameter is set, it’s value will be sent as the body of the request. The name of the原创 2012-03-19 16:42:56 · 4992 阅读 · 0 评论 -
WP7 - WebBrowser + InvokeScript异常
使用WebBrowser控件调用JS遇到了几个问题,记录如下:系统:WP7.1(Mango)问题1:InvokeScript 与 对象名+方法名使用如下方式调用js方法,InvokeScript("objName.methodName);总是得到异常:An unknown error has occurred. Error: 80020006.注:"80020006"错误通常为找不到JS方法引起原创 2012-03-12 00:11:45 · 3724 阅读 · 0 评论 -
WP7 Tip #1 三星Focus
<br />拿到了我的第一台wp7手机 三星Focus,第一个Tip就上一张它的图片吧,首批9款wp7手机中这一款是最轻薄的<br /> <br /><br /> <br /> <br />原创 2011-02-17 11:43:00 · 1282 阅读 · 0 评论 -
WP7 Tip #2 锁机状态下拍照
<br />锁机状态下,长按拍照键,可自动解锁,进入拍照模式原创 2011-02-17 12:04:00 · 1017 阅读 · 2 评论 -
Hot Tip - 5个必须的WP7 toolkits
<br />5个很有用的toolkits for windows phone 7, 其中一个是关于数据库的原创 2011-02-14 16:49:00 · 1592 阅读 · 0 评论 -
WP7 - 官方教程
<br />ScottGu在twitter上发了一个链接 http://create.msdn.com/en-us/education/quickstarts原创 2011-02-14 16:02:00 · 1293 阅读 · 0 评论 -
WP7 - 全景视图界面设计
<br />全景视图是WP7引入的一个重要UX概念,Microsoft也提供了相应的设计模板。Taylor的一篇blog介绍了如何使用模板设计一个简单的全景试图界面,他使用的设计工具是免费的GIMP原创 2011-01-31 12:42:00 · 3070 阅读 · 1 评论 -
WP 7 - 关于"返回"键
<br /> <br />WP7 为保证应用程序的一致性,在程序提交审核时,会检查"当按下返回键,是否返回到前一页面",有人为此遇到了麻烦 ,评论中有一个链接,是 msdn blog上的一篇文章,讲解了如何导航的一些原则原创 2010-11-24 22:24:00 · 1738 阅读 · 1 评论 -
Windows Phone 7 - 获取本机号码?
一个朋友问如何获取wp7上的本机号码, Windows.Phone.Tasks命名空间下没有相应的类支持,搜索了一下,好像目前暂不支持:the compulsory windows live id will not be available to developers (at least at this stage). Presumably this is to protect the consumers identity - I believe the same restriction will be i原创 2011-01-19 09:38:00 · 2502 阅读 · 1 评论 -
Tip - WP7教程列表
<br />Ghassan Chahine 给出了一个列表,大概有30多篇关于wp7的文章原创 2011-01-05 16:52:00 · 1488 阅读 · 1 评论 -
WP7 - 31天教程
<br /> Jeff Blankenburg 用了31天,每天一篇总结了WP7系列教程原创 2010-12-09 09:58:00 · 997 阅读 · 0 评论 -
Silverlight - Silverlight for Windows Phone中的Render 线程
Silverlight for Desktop中没有单独的render thread,跟界面相关的操作都运行在一个UI thread中。之所以不像WPF那样设计一个单独的render thread,Ashraf Michail是这样解释的:Since WPF provides a rendering thread, it is probably surprising that Silverlight does not. You may be interested to know why.原创 2010-06-13 16:40:00 · 1879 阅读 · 0 评论 -
Tip: Windows Phone 7 - Theme
<br />Windows Phone 上的Theme并不同于Silverlight for Destkop 或者WPF的Theme,而是设备相关的Theme。<br /> <br />Windows Phone 的Theme内置了一些有关颜色、文字等的资源定义,设计界面是应尽量使用这些内置的资源,可以确保应用程序界面的一致性原创 2011-05-09 17:43:00 · 2479 阅读 · 0 评论 -
Silverlight for WP only - 没有跨域调用限制
<br />Silverlight for Destkop 如有cross-domain调用,则需要被调用方提供一个policy文件。<br /> <br />Silverlight for Windows Phone 去掉了这个限制 - 来自wp论坛的信息<br /> <br />It was explicitly stated in one of the sessions (I'm sorry I can't remember which one) that cross-domain restric原创 2011-05-13 16:57:00 · 3246 阅读 · 0 评论 -
Windows Phone - 各种Uri
今天被几个Uri搞晕,记录在案,备忘:1. ApplicationBarIconButton 的Icon Uri: 所引用的Image的Build Action属性必须是"Content"The URI must point to a file in the application directory. When adding an image file to an project using Windows Phone Developer Tools, you must set the Build Act原创 2011-05-14 17:53:00 · 4219 阅读 · 1 评论 -
WP7 - 关于使用Google AdMob SDK的几个问题
一个WP7应用中使用了Google AdMob 控件 (客户要求使用google ad,若无要求,强烈建议使用MS的 Ad控件)。下面是使用AdMob 的WP7控件遇到的问题:1. 墙 - 国内目前无法显示ad内容。如需测试,请用vpn电脑翻墙,手机连接电脑,测试显示效果2. 严重的crash: 使用目前最新的4.0.4版本依然有2个严重的异常:异常1: 常在有ad的页面加载时就抛出 Syst原创 2012-02-26 03:24:36 · 3061 阅读 · 2 评论