Patrick
Patrick

Reputation: 884

Application Command versus Custom Command (through Relay Pattern)

Have a quick theoretical question - if somebody can help answer:

The application commands which WPF provides - are they technically useless (or should not be leveraged) specifically in MVVM pattern since the Custom Commands (Relay Command Pattern) is used in all cases. That's what my reading seems to indicate but wanted to get some thoughts on this.

MSDN Article

If not - can somebody please also point to a quick code sample of application commands and its correct usage within MVVM pattern.

Upvotes: 0

Views: 183

Answers (1)

CodingGorilla
CodingGorilla

Reputation: 19852

I'm not sure exactly what you're asking; the ApplicationCommands is a set of commom commands that an application might need to make use of, so I wouldn't say they're useless but they have specific usages which in many applications are probably not useful. Personally I've never used them.

I think you will find that a lot (me included) of people that write WPF applications using the MVVM pattern will use some variation of the DelegateCommand, and as evidence I would offer that most of the MVVM frameworks offer an implementation of such.

Upvotes: 1

Related Questions