UPDATE (Mar 20, 2013): Icenium v1.3 was released yesterday with the ability to target iPhone or iPad only on iOS, one of my suggestions below. Thanks, Telerik team!


I'm just wrapping up my first project using Icenium, Telerik's cloud-based IDE for creating Android and iOS apps using HTML5, CSS3, and Javascript. I must say that it's been a very enjoyable experience and I've been very impressed with the product that our friends at Telerik have created.

It's a bit unfair to do a full review of this product yet, since it's so new and still in v1. ...
Since late 2012, Microsoft has been offering access to an Windows Azure-hosted Team Foundation Server (TFS) which they branded as "Team Foundation Service". At the beginning of the year, they took (most of) this service out of beta and announced that it would stay free for teams of 5 or less. The pricing for bigger teams hasn't been announced yet, and remains free currently, and is likely to be very affordable going forward.

For a lot of companies, Falafel included, this is a very compelling option. This service already gives you all the benefits of a cloud-hosted source control repository: ...
If you've looked at JavaScript recently after any kind of hiatus, you've probably noticed that the language has changed a little in the last few years. Technically, the language hasn't changed so much as the way we use it has. 

One of the most noticeable changes--besides the daily multiplying list of new libraries and frameworks--is the object oriented way in with the language is used. For instance, instead of just creating a sea of functions, you might now create your JavaScript code in classes of related functionality:

var mathObj = {
    writeToLog: function (message) {
I was working on a Silverlight application with a WCF RIA Services middle-tier recently when the need arose for us to add an HTML/Javascript front-end in addition to the existing Silverlight one. I knew Microsoft offerd WebAPI services that are specially geared toward being consumed by Javascript clients, but the team wanted to leverage the existing work we'd done on the middle-tier in RIA Services if possible.

So the question was, could I publish my existing RIA domain service in a way that is Javascript-friendly? WCF RIA Services exposes its domain services in a binary-format by default. Javascript works better with a ...

The Problem

I recently discovered that the default Silverlight DateTime format is different on MacOS than it is in Windows.


On Windows



On MacOS



There are a couple of differences, but the most noticeable is that time zone offset at the end of the time that shows on the Mac. On my computer the time zone offset shows as “-4:00” because I’m generating a DateTime in local time, which for me is currently Eastern Daylight Time (EDT), or 4 hours behind Coordinated Universal Time (UTC).


The application is following the best practice of storing all DateTimes ...

What I'm Up To

This week, I'm learning iOS development after 13 years of programming on the Microsoft stack (primarily .NET). Developing for iOS requires a computer running MacOS, which in turn requires a Mac (ignoring the rather iffy option of running a Hackintosh).

I first learned to program on two Apple computers--BASIC on an Apple IIe and C++ on a Mac LC. It's been many years since those machines were on my desk, and my regular Mac use has been a bit spotty since then. As a result, I'm having to refamiliarize myself with some of the little differences ...

I was working with a client recently when I encountered a completely unexpected bug. Figuring out the problem reminded me of some facts about how C# (and all the .NET languages) work and got me thinking about the fact that object-type variables in .NET are basically pointers, even though it’s hidden from you most of the time.

The Problem

An object instance was passed into a method. If the parameter was not null, it was simply updated, but if the parameter was null, then it was instantiated first, then updated.

It looked something like this:

class Widget

I’m a huge fan of the Microsoft Prism framework. In fact, I’ve blogged before about using its DelegateCommand to minimize your ViewModel code.

Lately, though, I noticed that once its CanExecute delegate returns false, your IsEnabled binding will not update, even when the property it’s bound to changes.

Try It Out: Live Example

Note: Silverlight 4+ Plug-in Required
Get Microsoft Silverlight


As you can see, the button entitled “Prism Command” starts out disabled and never enables, even though its IsEnabled property is bound to the same property of the ViewModel as the other buttons (see below).


<Button Content=...

I was recently asked by a client to help upgrade their application from Silverlight 4 to Silverlight 5. The upgrade worked perfectly except for one third-party assembly that had not yet been upgraded to Silverlight 5. The client only needed to use this assembly to generate QR Codes--those black-and-white barcode squares you often see people scanning on their smartphones—so my task was to find them a replacement QR Code library.

Sample QR Code

My colleague, Josh Eastburn, pointed me to a free option that was created for use in WP7 apps, but works just fine in Silverlight 5. You ...

If you’ve been programming in Silverlight for long, you may have noticed the project setting “Reduce XAP size by using application library caching” in you Silverlight project’s settings.  You may have even checked it on to see what happens.

If you did try it, most likely nothing happened.  This is because there are a few simple prerequisite steps you have to take in order to take advantage of application library caching. 

In this blog post, I’ll step you through those set up steps.  But first, why would you want to use application library caching?


Why Use Application Library Caching?...

My friend Basem has a nice blog post about the most useful features of the Productivity Power Tools extension for Visual Studio 2010.  It’s definitely worth a read if you haven’t read it already.  Like Basem, I love the Productivity Power Tools extension and use most of it’s features on a daily basis.  And, until recently, I’d run into only a very few issues with it, all of which I’d classify as minor annoyances. 

Recently though, I ran into one issue that put me off track for a while trying to figure it out.  It happened when I created a ...

Have you ever created a UI element in Silverlight (a Grid, Rectangle, Border, etc.) with transparent components and wondered why it was so hard to click on?  Most likely, it’s because the background or fill brush of your element is null.  Null fill and background brushes allow mouse events (and touch events for WP7 apps) to go through to whatever is behind the element in question.

Instead, you can set a fill or background brush to the pre-defined color “transparent”, and your element will now always intercept mouse and touch actions and raise the corresponding events.

Below is a simple ...

Someone recently asked me for advice on how to bind the visual state of a Silverlight control to a property of the view-model.  Specifically, they had a Boolean property on their view-model named something like IsExpanded that they wanted to control the expanding and collapsing of a control in the view with the value of this view-model property.

It was such a fun sounding challenge—and one that seemed like it would be very useful to have for many situations—that I couldn’t resist creating a simple solution. 

Here’s What I Created (Silverlight 4 Plug-In Required)

Get Microsoft Silverlight


Here’s How I Did It...

Snickers fans know how nice nougat can be, even if they don’t really know what it is.  Microsoft produces a different kind of NuGet that’s also really nice and not well understood.

The NuGet site on codeplex says that it is a “package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development”. 

That’s a good summary, but here’s how I think of it--I no longer have to worry so much about keeping all my .NET tools and libraries up-to-date or spend a lot of time figuring out ...


As most .NET programmers no doubt already know, casting is required when converting from one type to another type when information might be lost, also now as narrowing conversions.  In C# there are two different ways to cast:

1) Casting using the prefix style

object value1 = 123;
string value2 = (string)value1;


2) Casting using the “as” keyword

object value1 = 123;
string value2 = (value1 as string);

There are some simple and arbitrary reasons to use one of these over the other.  Perhaps the most arbitrary reason people use one method or the other ...

I love the M-V-VM pattern for Silverlight and WPF applications.  It’s beautiful and works very well, but sometimes it is too verbose, particularly in the ViewModels’ INotifyPropertyChanged implementations.  I find that I spend too much time on the repetitive plumbing tasks that could otherwise be spent programming the actual application logic.

There are many tools and frameworks out there to speed up and simplify MVVM (Caliburn, MVVM Light, WAF, etc.), but I just discovered a very simple tool that goes a long way toward making MVVM more useable. 

It’s called NotifyPropertyWeaver and it solves the problem ...

Even though I’ve been doing ASP.NET for 8 years, I never realized until today that when you put a breakpoint in Application_Start in Global.asax, it may never be hit.  The reason, I discovered, is that the debugger doesn’t have time to attach to the web application before Application_Start finishes.  To get around this, you can force your application to restart after the debugger has had a chance to attach by simply editing and saving a change the web.config.  This causes the application to restart and your breakpoints in Application_Start will now be hit.

There has been some angst in the .NET development community lately as Microsoft has started putting a lot of emphasis on HTML5, especially leading up to the release of IE9.  The issues center around the overlap in capabilities provided by both technologies and Microsoft’s seemingly incongruous dedication to both.

Well, the Silverlight Team is now weighing in on the controversy on their blog here: http://team.silverlight.net/announcement/standards-based-web-plug-ins-and-silverlight/

To summarize, they are saying that software development has always required an array of tooling choices--some with some feature overlap--but that Microsoft sees different advantages and disadvantages to both HTML5 and Silverlight, and that leads ...

Fans of Internet standards, rejoice!  Today Microsoft officially brings us Internet Explorer 9 which scores a 95 out of 100 on the ACID3 test and passes the CSS Selectors Test with flying colors.  It’s worth noting that IE9’s ACID3 score is one point more than the current version of Mozilla’s Firefox, but still five points below Chrome and Safari.  Many developers will also be very happy to know that this latest offering from Microsoft implements many of the new features of HTML5!

To me, IE9 is a story of Microsoft finally starting to catch up to the other browsers, but ...

UPDATE May 4, 2011: It was brought to my attention that there was a typo in my code below, but it is now fixed.

I sometimes find it necessary to walk the visual tree of controls in Silverlight (or WPF) at run-time.  The VisualTreeHelper class provides some nice functionality for doing this.  However, using the VisualTreeHelper can sometimes require a little too much code, especially when I want to search the visual tree recursively. 

For this reason I created some simple extension methods to do the recursing for me.  Let’s cut right to the chase.  Here’s the code:

Get weekly updates in your inbox!