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…

Silverlight 5’s New and Improved Threading Architecture

Silverlight 5 boasts a wealth of sexy new features, including a full-blown, hardware-accelerated 3D graphics API, support for custom markup extensions, multiple-window support in trusted out-of-browser apps, and the ability to run trusted applications in the browser (with sufficient permissions, of course). Post-beta, even more features will be added, such as support for invoking native…

Silverlight 5’s New Style Data Binding

Another of the minor but potentially useful new features coming in Silverlight 5 – and already present in the Silverlight 5 beta – is style data binding. Simple put, style data binding allows you to use data-binding expressions to assign values to style setters. It may not sound that exciting, but among other things, it…

Silverlight 5’s New RichTextBoxOverflow Control

Silverlight 5 boasts a lot of big new features, but sometimes it’s the little things that count. A case in point is the new RichTextBoxOverflow control, which simplifies the process of implementing newspaper-style layouts in Silverlight applications. It may not be as sexy as the new 3D graphics API, but RichTextBoxOverflow will be your best…

Using Custom Markup Extensions in Silverlight 5

The first beta of Silverlight 5 was announced at MIX this week and is available for downloading. As such, I’ll be blogging about the new features in weeks to come. I’ll also be delivering sessions on Silverlight 5 at several upcoming conferences, including Microsoft TechDays in Belgium, Microsoft DevDays in the Netherlands, Devscovery in Redmond,…

Canvas Animations in HTML5

HTML5’s Canvas and CanvasRenderingContext2d bring something to HTML5 that has long been missing from HTML: the ability to draw pixels into a browser window. I wrote about the canvas API in a previous post entitled Making HTML5 Come Alive with the Canvas API. This time, I’d like to build on that post by exploring a…

Making Web Apps Sizzle with Bing Maps and HTML5’s Geolocation API

A few weeks ago, I wrote about Silverlight for Windows Phone’s location API, which allows applications to ascertain their location – latitude, longitude, altitude (if GPS is available), and so on. More recently, I’ve been writing samples around HTML5’s geolocation API. The two APIs are remarkably similar save for HTML5’s lack of support for setting…

Silverlight for Windows Phone Programming Tip #8

One of the remarkable aspects of Windows Phone 7’s WebBrowser control is that you can build an entire Web site in isolated storage, point the WebBrowser control to it, and view the Web site on your phone. Once IE for Windows phones comes to support HTML5 (and that day can’t come soon enough, IMHO), this,…

Silverlight for Windows Phone Programming Tip #7

I recently worked on a phone project that required me to tombstone a MediaElement control. Basically, I needed to save the current playback position when the app was deactivated, and restore it when (and if) the app was reactivated. So I whipped up something like this:   protected override void OnNavigatedFrom(NavigationEventArgs e) {     this.State["Pos"]…