Friday, January 17, 2014

WAMS WPF QS (Window Azure Mobile Services Windows Presentation Foundation Quick Start]

Microsoft Developer Network - Samples - Azure Mobile Services Quickstart for WPF

One of the great features in my opinion of Azure Mobile Services is the “quickstart” app – a ready-to-use, fully-functional application which you can get from the portal in many of the supported platforms, and start running right away. I find it to be a great way to learn about the service and the client SDK for the selected platform.

In the portal one can download a QuickStart app for the most used platforms. But every once in a while someone asks about another platform which is not in the list. Since not all platforms will make its way to the portal (unless there is strong demand for that), I’ll try to answer that question, specifically about WPF, with this post.

Creating the QuickStart app for WPF isn’t too hard – after all, the NuGet package with the client SDK for Azure Mobile Services actually supports WPF apps as well (as long as they target the .NET Framework 4.5). It has most of the functionality as the more prominent platforms, with the notable exception of the lack of the UI-based login feature (which can be implemented as an extension, as I’ve shown in another post). So, without further ado, here are the steps I took to create the app.

If you just want to get the app, download from this sample and replace in the file App.xaml.cs the URL and key for your mobile service.

Create a new WPF project


At this point (after replacing the service name and key with the actual values) you should be able to build and run the app.

That's it. Those are the steps to convert the Windows Store QuickStart into a WPF one. But if you just want the code, feel free to download it from this sample.


It's easier for me, and most people I'm sure, to learn if I can focus on one area at a time. WAMS demo's are usually also mixed in with other tech, all that's pretty new for me. This quick start lets me focus on that one thing, learning WAMS, without distracting me with mobile or WinStore dev. Nice...

Make sure you check out the original blog about for this, Carlos Figueira MSDN blog - Azure Mobile Services QuickStart for WPF

No comments: