tags:

views:

286

answers:

2

I was looking through Josh Smith's MVVM Example and I noticed he defines a basic view model called CommandViewModel, and looking through his demo app, I just can't see the point of it.

+5  A: 

As far as I can tell, the CommandViewModel just represents a command that the user can perform. A collection of these view models is used to render a set of commands, similar to a tool bar or shortcut list.

HTH, Kent

Kent Boogaart
oh simple enough, I thought it was a neccisary component of MVVM...
Firoso
A: 

My impression is that it is a view model whose sole concern is a single command. I suppose this allows you to not only encapsulate the command but also other bindable, relevant things such as Name, but also potentially other UI stuff related to the command (tooltip, etc).

Will