Skip to content

F# MVVM: DelegateCommand

July 31, 2011

Although most projects probably wouldn’t be using F# to program their WPF views, the ViewModel layer can certainly be implemented in F#. I’ve implemented a simple DelegateCommand class which can be used whilst building your F# ViewModel layer.

If you are not sure what a DelegateCommand is, or how to use it, then there is a nice example here (in C#): http://kentb.blogspot.com/2009/04/mvvm-infrastructure-delegatecommand.html

Simplified F# version:

HTH

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: