Pages

Wednesday, 12 September 2012

WinRT: Creating an Image Collage in C#


WinRT: Creating an Image Collage in C#
Collage - is a technique of art production, primarily used in the visual arts, where the artwork is made from an assemblage of different forms, thus creating a new whole. ~ Source Wikipedia

I imagined the process would be straightforward but the fact is I found a couple of gotchas that I was able to overcome eventually. In this post, we will see how we can stitch together a series of images to build a collage. Let’s jump right in.

Read More

How to find an element in a DataTemplate in WinRT/XAML


Here’s one way to find a named element in a DataTemplate in XAML in Windows 8 XAML.

You might try FindName to discover it doesn’t work. That’s because it’s not recursive.

So, I created a simple extension method to do the same thing

Read More

Windows 8 Apps With HTML5 Published in Visual Studio Magazine (September 2012)


Windows 8 Apps With HTML5 Published in Visual Studio Magazine (September 2012)
I have a new cover story article published in print and online in Visual Studio Magazine today called, “Windows 8 Apps With HTML5”. If you're an experienced Web developer, you'll love the new Windows Store options to use HTML5/JavaScript/CSS3 to build an application that works in the Windows 8 UI. Here's a step-by-step guide to getting started.

See below for more information and a link to the online article in case you don’t get a print copy.

Read More

Tuesday, 11 September 2012

Consuming the Amazon S3 service from a Win8 Metro Application


Consuming the Amazon S3 service from a Win8 Metro Application

As many of the existing Http APIs for Cloud Services, AWS also provides a set of different platform SDKs for hiding many of complexities present in the APIs. While there is a platform SDK for .NET, which is open source and available in C#, that SDK does not work in Win8 Metro Applications for the changes introduced in WinRT. WinRT offers a complete different set of APIs for doing I/O operations such as doing http calls or using cryptography for signing or encrypting data, two aspects that are absolutely necessary for consuming AWS. All the I/O APIs available as part of WinRT are asynchronous, and uses the TPL model for .NET applications (HTML and JavaScript Metro applications use a model based in promises, which is similar concept).

In the case of S3, the http Authorization header is used for two purposes, authenticating clients and make sure the messages were not altered while they were in transit. For doing that, it uses a signature or hash of the message content and some of the headers using a symmetric key (That's just one of the available mechanisms). Windows Azure for example also uses the same mechanism in many of its APIs.

Read More
Web Informer Button