MVVM

Spider Solitaire and Augmented Reality

A while ago, I made an implementation of Solitaire and Spider Solitaire using WPF and my Apex MVVM library. I wrote about it on the CodeProject, in an article called Solitaire and Spider Solitaire for WPF (imaginative title indeed). Anyway, just recently I got a very interesting message from rupam rupam, who has made an augmented reality version of the project! In his application, you use your webcam to play the game physically by picking up cards with gestures.
Read more

Apex Part 2 - Adding Commands to an MVVM Application

In Part 2 of my video tutorial series on using Apex I show you how you can add commands to an MVVM application. Commands let you rapidly add functionality to a ViewModel, whilst still maintaining separation from UI. A CodeProject article to accompany this video will be published shortly.

Apex Part 1 - Getting Started with the Apex SDK

Create an MVVM application in minutes with the new Apex SDK! The video below shows this in action, see what you think. There is also an accompanying article that describes what's going on. As always, would love to hear feedback! http://www.codeproject.com/Articles/371217/Apex-Part-1-Create-Your-First-MVVM-Application

Funky WPF - Enumerations and the Combo Box

Binding a combo box to an enumeration in WPF is more work than it should be, creating an object data provider etc etc: <Window.Resources> <ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="CharacterEnumValues"> <ObjectDataProvider.MethodParameters> <x:Type TypeName="Character" /> </ObjectDataProvider.MethodParameters> </ObjectDataProvider> </Window.Resources> Followed by <ComboBox SelectedItem="{Binding Character}" ItemsSource="{Binding Source={StaticResource CharacterValues}} "/> What a pain! I have just added 'EnumerationComboBox' to my Apex library - so now you can do this: <!-- The combo box, bound to an enumeration.
Read more

MVVM Commanding

I have written an article that describes commanding in WPF, Silverlight and WP7 in detail. It is on the CodeProject at: http://www.codeproject.com/KB/WPF/consistentmvvmcommands.aspx It uses the latest version of Apex (version 1.2) which will be released formally shortly. Enjoy!

MVVM: Asynchronous Commands

The latest cut of the Apex Code (http://apex.codeplex.com/SourceControl/changeset/changes/6701) contains a very cool new feature - Asynchronous Command Objects. An Asynchronous Command is a ViewModelCommand - the standard object used in Apex for commanding. However, what is different about this function is that it runs Asynchronously. One of the problems with running a view model command asynchronously is that generally the view model properties cannot be accessed - as they're created on a different dispatcher.
Read more