Category Archives: Development

Error using the most recent version of RestSharp in wp7.

When adding RestSharp via NuGet to WP7 project, you will probably receive the following error:

File or assembly name ‘Newtonsoft.Json, Version=4.0.5.0, Culture=neutral, PublicKeyToken=30AD4FE6B2A6AEED’, or one of its dependencies, was not found.

Read the rest of this entry

HTML5 canvas full view

I just wanted to share this small code sample for embedding HTML5 canvas fully inside the browser window. The simplest HTML looks like this:

<!DOCTYPE HTML>
<html>
    <head>
    </head>
    <body>
        <canvas id="myCanvas" style="">
        </canvas>
    </body>
</html>

Read the rest of this entry

Google Data API with RestSharp on WP7 Update

Special thanks to John Sheenan who pointed out an error in my code. First of all, calling Dispatcher.BeginInvoke is redundant since the callback action will be invoked on the main thread.

Secondly, there is a powerful deserialization feature in RestSharp. Create a simple class that will correspond to the deserialized JSON object: Read the rest of this entry

Google Data API with RestSharp on WP7

RestSharp is an open source REST client for .NET. I will use it for consuming Google Data API. You can easily install via the following NuGet command

Install-Package RestSharp

First step is creating an application in API Console and selecting services that you will be using. In this example, we will use the Tasks API. Once you create your project with the appropriate settings, you will need client_id and client_secret which is available on the API Access page. Read the rest of this entry

Sprite Sheet Packer

Sprite Sheet Packer (at codeplex.com) is an excellent little utility for packing all sprites in a single large texture. It is very simple to use, simply add all the files that need to be packed and select destination file path and type. Transparency will be preserved for PNG images. For preventing issues when using mipmaps, you can add the padding around each image. Read the rest of this entry