What is the accepted pattern for WPF commanding in MVVM?
Posted
by Robert S.
on Stack Overflow
See other posts from Stack Overflow
or by Robert S.
Published on 2009-12-15T16:23:26Z
Indexed on
2010/06/02
12:33 UTC
Read the original article
Hit count: 343
I'm working on a WPF app and I understand the command pattern pretty well, but I've found that there are several different implementations of the command pattern for MVVM. There's Josh Smith's implementation in his WPF sample app, the DelegateCommand
from Prism, and the CommandBindings
implementation.
My question is, what is the generally accepted best practice for using commands with MVVM? My application uses Prism so DelegateCommand
is available to us.
The devs on my team are arguing about which approach is "best." Some don't like the numerous .cs files generated for each command, others prefer that everything be wired up via CommandBindings
. I'm at a loss. Can anyone shed some light?
© Stack Overflow or respective owner