MVVM async progress meter example using the Task Parallel Library

I’ve just posted up on GitHub a quick example WPF application that shows an MVVM-style progress meter dialog, using the .NET 4.5 Task Parallel Library (TPL). Specifically demonstrating: A progress meter using .NET 4 Tasks (not BackgroundWorkers). Async support. Cancelling of Tasks via CancellationTokens. Exception handling back to the original thread. Reporting background progress updates …

The Fat ViewModel

If someone asked you, what are the building blocks of MVVM, what would you say? Models, Views, and ViewModels, of course. It’s in the name. But really, there are two others: Models Views ViewModels Commands Events If Commands and Events aren’t strongly represented in your application, I’d say there is a strong chance it isn’t …

Null Object pattern for a WPF ComboBox’s deselected value

Last week, I encountered a problem doing some fiddly UI behaviour in a Prism/MVVM app. I wanted something like this: FX curve: USD GBPEUR GBP I wanted a ComboBox where you can choose one of the available options, or none of them. Null, deselected, whatever. Unfortunately for me, WPF doesn’t support binding null values in …