Pull to refresh On Windows Phone

Check out this: WP8PullToRefreshDetector.cs using Microsoft.Phone.Controls; using System; using System.Windows.Controls.Primitives; /// <summary> /// This class detects the pull gesture on a LongListSelector. How does it work? /// /// This class listens to the change of manipulation state of the LLS, to the MouseMove event /// (in WP, this event is triggered when the user moves … Read more

Is it possible to update an existing Windows Phone 8 app to Windows Phone Store 8.1

TL;DR; – It preserves data on Isolated Storage when updating from WP8.0 to WP8.1 Runtime. Because the provided link to MSDN says only about Silverlight apps, and it’s not clear (if I hadn’t missed something) what would happen in case: I’ve old WP8.0 Silverlight App and now I decided to upgrade it to WP8.1 Runtime … Read more

Converting image to base64

What about trying: public static BitmapImage base64image(string base64string) { byte[] fileBytes = Convert.FromBase64String(base64string); using (MemoryStream ms = new MemoryStream(fileBytes)) { Image streamImage = Image.FromStream(ms); context.Response.ContentType = “image/jpeg”; streamImage.Save(context.Response.OutputStream, ImageFormat.Jpeg); return streamImage; } } I agree with Alexei that your code for reading the image in does look a little strange. I’ve recently written some code … Read more

How to post data using HttpClient?

You need to use: await client.PostAsync(uri, content); Something like that: var comment = “hello world”; var questionId = 1; var formContent = new FormUrlEncodedContent(new[] { new KeyValuePair<string, string>(“comment”, comment), new KeyValuePair<string, string>(“questionId”, questionId) }); var myHttpClient = new HttpClient(); var response = await myHttpClient.PostAsync(uri.ToString(), formContent); And if you need to get the response after post, … Read more

How to Deserialize JSON data?

You can deserialize this really easily. The data’s structure in C# is just List<string[]> so you could just do; List<string[]> data = JsonConvert.DeserializeObject<List<string[]>>(jsonString); The above code is assuming you’re using json.NET. EDIT: Note the json is technically an array of string arrays. I prefer to use List<string[]> for my own declaration because it’s imo more … Read more