Silverlight for Windows Phone Programming Tip #4

Here’s a quick one that’ll save you a lot of time and trouble if you’re not already aware of it. One of the coolest features of Visual Studio is that you can launch a debug run of a phone application on a phone rather than in the emulator. Since the emulator can’t emulate everything, sometimes…

Silverlight 3’s New Element Data Binding

One of the improvements you can look forward to in Silverlight 3 is element data binding, also known as element-to-element data binding. Silverlight 2’s {Binding} expression allowed you to specify the name of the property you were binding to, but not the element that owned the property. This typically meant you had to write a…

Building Windows Store Apps in HTML5 for Your Surface RT

My, what an interesting autumn it has been. Windows 8 has shipped, the Windows Phone 8 SDK has been made available to the public, Windows Phone 8 devices are just a few days away, and Surface RT – the new tablet from Microsoft – has landed in the hands of users world-wide. There has never…

Enumerating Cameras and Camera Locations on Your Surface RT

When I teach classes at Microsoft, I often precede a juicy tidbit of information or code sample with the statement “Here’s a good interview question for you.” Well, here’s a good interview question for you – especially if you want the interviewee out of your office as fast as humanly possible. How do you get…

Introducing MyComix Reader, Version 0.5

As I wrote the Contoso Cookbook app and accompanying labs for Microsoft last winter, I found myself thinking that it would be cool to build another end-to-end Windows Store sample – one that could go beyond the basics and demonstrate fun features and programming techniques that Contoso Cookbook did not. At the same time, I’ve…

Manipulating Navigation State in Windows Store Apps

I received an interesting question from a customer today. He wanted to know how to manipulate the navigation history to skip a page in the backstack in a Windows Store app. In other words, he wanted to do in Windows 8 something similar to what NavigationService.RemoveBackEntry does in Windows Phone 7.1. The scenario he presented…

A CoverFlow Control for Windows 8 and Your Surface RT

A few years ago, I needed a CoverFlow control for a Silverlight project I was working on. Since Silverlight didn’t include a CoverFlow control, I did a little searching and found an open-source XAML CoverFlow control on CodePlex. So I downloaded the code, tweaked it a bit, and quickly had a control with the basic…

Building Location-Aware Apps for Your Surface RT

Microsoft’s Surface RT lacks a GPS receiver (bummer!), but you can still use WinRT’s location API to build location-aware apps for it. As long as you have a WiFi connection, the location API can determine where you are with a reasonable degree of accuracy – sometimes with astonishing accuracy – using WiFi positioning. Furthermore, you…

Fun with the Accelerometer on Your Surface RT

One of the cool things about Microsoft’s Surface RT is that it comes with a rather complete array of sensors. Among those sensors are an accelerometer, which allows software running on the device to sense the acceleration along the X, Y, and Z axes in real time. As a practical matter, that means software can…

Who Wants to be a Millionaire?

Windows 8 is out, ads are flooding the airwaves (bravo, Microsoft!), and the punditshpere is teeming with articles generally praising the platform but decrying the lack of apps. As Reuters recently put it, “A lack of apps is Microsoft’s Achilles heel as it attempts to catch Apple Inc and Google Inc in the rush toward…

Enriching Windows Phone 7.1 (“Mango”) Apps with Secondary Tiles

Another new feature of Windows Phone 7.1 that every developer should know about is secondary tiles. Windows Phone 7.0 allowed users to pin an app to the Start screen, creating a tile for that app. But it limited apps to one tile each, and it provided no mechanism for passing information to an app launched…

Building Cross-Platform Mobile Applications with HTML5 and Mango

One of the most exciting new features coming in Windows Phone 7.1, code-named “Mango,” is an HTML5 Web browser based on IE9. One by-product of this addition is that you can use Mango phones to browse HTML5 Web sites. But the greater implication is that developers can now use HTML5 to build cross-platform mobile applications…