windows-phone-7

type or namespace Task could not be found

假如想象 提交于 2020-07-20 07:22:26
问题 I'm using Microsoft Visual Studio express for windows phone, when i use TASK in my app, i get the above mentioned error, even System.Threading.Tasks is also not found. What could be my problem?? 回答1: You need to target at least .NET Framework 4 in your project. You can change this under project properties. Also, changing the target will not add the reference for the library, so you have to do this manually after changing the target framework. 回答2: Right click on Task, choose Resolve > System

Bug in WP 7 implementation of Uri.IsWellFormedUriString?

≡放荡痞女 提交于 2020-06-14 04:10:39
问题 In a .NET 4 console application, and a Silverlight 4 application, the following returns false : Uri.IsWellFormedUriString ("/test", UriKind.Absolute) but the same call in a Windows Phone app (7.0 or 7.1 using SDK 7.1 Beta 2 published 6/29/11) returns true . Can anyone else confirm this? Is this a bug in WP7? Update I reported this as a bug on Microsoft Connect and received an update today that it has been closed as "Wont' Fix". This doesn't matter to me but I thought I would add this update

Bug in WP 7 implementation of Uri.IsWellFormedUriString?

*爱你&永不变心* 提交于 2020-06-14 04:10:11
问题 In a .NET 4 console application, and a Silverlight 4 application, the following returns false : Uri.IsWellFormedUriString ("/test", UriKind.Absolute) but the same call in a Windows Phone app (7.0 or 7.1 using SDK 7.1 Beta 2 published 6/29/11) returns true . Can anyone else confirm this? Is this a bug in WP7? Update I reported this as a bug on Microsoft Connect and received an update today that it has been closed as "Wont' Fix". This doesn't matter to me but I thought I would add this update

Async calls in WP7

大兔子大兔子 提交于 2020-02-23 10:00:35
问题 I have been experimenting with WP7 apps today and have hit a bit of a wall. I like to have seperation between the UI and the main app code but Ive hit a wall. I have succesfully implemented a webclient request and gotten a result, but because the call is async I dont know how to pass this backup to the UI level. I cannot seem to hack in a wait for response to complete or anything. I must be doing something wrong. (this is the xbox360Voice library that I have for download on my website: http:/

How to handle when the backspace button is pressed and the input panel has digit grouped numbers. E.g. 434,343,334.232

梦想的初衷 提交于 2020-02-16 08:40:33
问题 I am making a calculator in c# for the windows phone and I'm struggling right now. Say the user wrote the digits 123,456. What I want to happen is when the user hits the backspace key, the comma stays in place and when the number 3 is deleted, so is the comma. Right now when the user hits the backspace key, the comma is deleted as the digits are being deleted. So when you erase the 6 and 5, 123,4 is left. Any help is highly appreciated. Thank you. 回答1: You could use String.Format("{0:n}",

How to handle when the backspace button is pressed and the input panel has digit grouped numbers. E.g. 434,343,334.232

﹥>﹥吖頭↗ 提交于 2020-02-16 08:40:09
问题 I am making a calculator in c# for the windows phone and I'm struggling right now. Say the user wrote the digits 123,456. What I want to happen is when the user hits the backspace key, the comma stays in place and when the number 3 is deleted, so is the comma. Right now when the user hits the backspace key, the comma is deleted as the digits are being deleted. So when you erase the 6 and 5, 123,4 is left. Any help is highly appreciated. Thank you. 回答1: You could use String.Format("{0:n}",

Convert List<T> to ObservableCollection<T> in WP7

为君一笑 提交于 2020-02-12 08:22:06
问题 I don't know if it's just too late or what, but I don't see how to do this... What I'm expecting to do, and what the object browser says is there, is this: var oc = new ObservableCollection<T>( new List<T>() ); But ObservableCollection<T> has a single parameterless constructor. The object browser says there is 2 overloads where List and IEnuerable should be able to be passed in. Is there something wrong with my setup? Are the constructors not on the phone version? (that would be strange) If

VS Developer Express for Windows Phone new project shows XamlParseException

浪子不回头ぞ 提交于 2020-02-07 04:08:29
问题 I recently installed windows 8 along with Visual Studio Express 2012 for Windows Phone. However, if I start a new Windows Phone App project (7.1, although 8 has the same issue) and open the MainPage.xaml file, an error appears in the designer window as follows: XamlParseException: Cannot find a Resource with the Name/Key PhoneBackgroundBrush [Line: 47 Position: 111] The MainPage.xaml file is as follows: <phone:PhoneApplicationPage x:Class="PhoneApp1.MainPage" xmlns="http://schemas.microsoft

VS Developer Express for Windows Phone new project shows XamlParseException

妖精的绣舞 提交于 2020-02-07 04:08:06
问题 I recently installed windows 8 along with Visual Studio Express 2012 for Windows Phone. However, if I start a new Windows Phone App project (7.1, although 8 has the same issue) and open the MainPage.xaml file, an error appears in the designer window as follows: XamlParseException: Cannot find a Resource with the Name/Key PhoneBackgroundBrush [Line: 47 Position: 111] The MainPage.xaml file is as follows: <phone:PhoneApplicationPage x:Class="PhoneApp1.MainPage" xmlns="http://schemas.microsoft