Questions tagged [windows-phone-7]

Windows Phone is Microsoft's, now deprecated, mobile operating system and software development platform. Use this tag for questions specific to Version 7.x

Windows Phone is a mobile operating system developed by Microsoft, and is the successor to its Windows Mobile platform. Supported platforms for building applications for Windows Phone include Microsoft Silverlight for traditional applications and Microsoft XNA for games. This platform is no longer supported by Microsoft and should be considered obsolete.

Development on the Windows Phone platform is only supported in managed languages, using either Silverlight or XNA. With the 7.1 SDK update, Silverlight applications can be integrated with XNA.

Windows Phone 7 featured a new user interface, based upon Microsoft's Windows Phone design system, codenamed and commonly referred to as Modern UI (previous name was Metro). The home screen, called the "Start screen", is made up of "Live Tiles", which have been the inspiration for the Windows 8 live tiles.

NOTE: With the 7.1 SDK, the ID_CAP_INTEROPSERVICES capability was removed, rendering third-party support for COM interop unusable. The native (unmanaged) layer is currently only available to OEMs.

External Resources

More information

See for more information.

19662 questions
177
votes
15 answers

Calculating Distance between two Latitude and Longitude GeoCoordinates

I'm calculating the distance between two GeoCoordinates. I'm testing my app against 3-4 other apps. When I'm calculating distance, I tend to get an average of 3.3 miles for my calculation whereas other apps are getting 3.5 miles. It's a big…
Jason N. Gaylord
  • 7,910
  • 15
  • 56
  • 95
167
votes
8 answers

Getting Started with Windows Phone 7

This is a community wiki list of Windows Phone 7 resources. Feel free to edit/add/etc. When posting, please use the friendly format of [Actual Name of resource with a link] not [some long URL with no meaning unless I click on it] General…
ctacke
  • 66,480
  • 18
  • 94
  • 155
163
votes
11 answers

How to hash a password

I'd like to store the hash of a password on the phone, but I'm not sure how to do it. I can only seem to find encryption methods. How should the password be hashed properly?
Skoder
  • 3,983
  • 11
  • 46
  • 73
120
votes
6 answers

How to trigger event when a variable's value is changed?

I'm currently creating an application in C# using Visual Studio. I want to create some code so that when a variable has a value of 1 then a certain piece of code is carried out. I know that I can use an if statement but the problem is that the value…
James Mundy
  • 4,180
  • 6
  • 35
  • 58
110
votes
5 answers

Developing cross platform mobile application

More and more mobile platforms are being launched and sdk's are available to developers. There are various mobile platform are available: Android, iOS, Moblin, Windows mobile 7, RIM, symbian, bada, maemo etc. And making of cross platform application…
sohilv
  • 1,712
  • 2
  • 16
  • 21
106
votes
4 answers

Add custom header in HttpWebRequest

I need to add some custom headers to the HttpWebRequest object. How can I add Custom Header to HttpWebRequest object in Windows Phone 7.
Nelson T Joseph
  • 2,683
  • 8
  • 39
  • 56
105
votes
3 answers

How to post data using HttpClient?

I have got this HttpClient from Nuget. When I want to get data I do it this way: var response = await httpClient.GetAsync(url); var data = await response.Content.ReadAsStringAsync(); But the problem is that I don't know how to post data? I have to…
93
votes
10 answers

TextBox.TextChanged event firing twice on Windows Phone 7 emulator

I have a very simple test app just to play around with Windows Phone 7. I've just added a TextBox and a TextBlock to the standard UI template. The only custom code is the following: public partial class MainPage : PhoneApplicationPage { public…
Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
81
votes
4 answers

How can I data bind a list of strings to a ListBox in WPF/WP7?

I am trying to bind a list of string values to a listbox so that their values are listed line by line. Right now I use this:
Joan Venge
  • 315,713
  • 212
  • 479
  • 689
78
votes
10 answers

Convert List to ObservableCollection in WP7

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( new List() ); But ObservableCollection has a…
Josh Close
  • 22,935
  • 13
  • 92
  • 140
78
votes
4 answers

Converting a JToken (or string) to a given Type

TL;DR Version I have a object of type JToken (but can also be a string) and I need to convert it into a Type contained in the type variable: Type type = typeof(DateTime); /* can be any other Type like string, ulong etc */ var obj =…
Uzair Sajid
  • 2,135
  • 2
  • 21
  • 28
74
votes
4 answers

Programmatically set TextBlock Foreground Color

Is there a way to do this in Windows Phone 7? I can reference the TextBlock in my C# Code, but I don't know exactly how to then set the foreground color of it. myTextBlock.Foreground = //not a clue... Thanks
user818700
73
votes
6 answers

Setting the User-Agent header for a WebClient request

What is the proper way of setting the User-Agent header for a WebClient request for Windows Phone 7? I found 2 options, but not sure which one is the correct one. Considering a WebClient object: WebClient client = new WebClient(); I saw 2…
AndreiC
  • 1,490
  • 4
  • 16
  • 34
59
votes
2 answers

Return Task instantly

I have a list of tasks, which i'd like to wait for. I'm waiting like await TaskEx.WhenAll(MyViewModel.GetListOfTasks().ToArray()); MyViewModel.GetListOfTasks() returns List of Task: var tasksList = new List(); foreach (var item…
54
votes
6 answers

How to POST request using RestSharp

I m trying to POST the request using RestSharp client as follows I m passing the Auth Code to following function public void ExchangeCodeForToken(string code) { if (string.IsNullOrEmpty(code)) { OnAuthenticationFailed(); } …
Ashish
  • 923
  • 2
  • 11
  • 16
1
2 3
99 100