DelegateCommand

Jun 17, 2010 at 9:12 AM

Hi,

Is it possible to have a Class implement the DelegateCommand? I just want to create separate classes for the commands that implements the CanExecute and ExecuteCommand. That way I can "clean" the ViewModel a bit.

Coordinator
Jun 17, 2010 at 9:15 AM
there is already it is called DelegateCommand<T>

Regards
Marlon
WPF Blog - http://marlongrech.wordpress.com/
Microsoft MVP for Client App



On Thu, Jun 17, 2010 at 9:12 AM, pcedendahl <notifications@codeplex.com> wrote:

From: pcedendahl

Hi,

Is it possible to have a Class implement the DelegateCommand? I just want to create separate classes for the commands that implements the CanExecute and ExecuteCommand. That way I can "clean" the ViewModel a bit.

Read the full discussion online.

To add a post to this discussion, reply to this email (MEFedMVVM@discussions.codeplex.com)

To start a new discussion for this project, email MEFedMVVM@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 17, 2010 at 9:34 AM

Yes I know but if I do like this:

 

public class GetServiceStatusCommand : DelegateCommand<string>    

{

}

 

How do I implement the Execute and CanExecute methods??

Coordinator
Jun 17, 2010 at 9:35 AM
in that case you would not implement a delegate command... you would implement the ICommand

Regards
Marlon
WPF Blog - http://marlongrech.wordpress.com/
Microsoft MVP for Client App



On Thu, Jun 17, 2010 at 9:34 AM, pcedendahl <notifications@codeplex.com> wrote:

From: pcedendahl

Yes I know but if I do like this:

 

public class GetServiceStatusCommand : DelegateCommand<string>    

{

}

 

How do I implement the Execute and CanExecute methods??

Read the full discussion online.

To add a post to this discussion, reply to this email (MEFedMVVM@discussions.codeplex.com)

To start a new discussion for this project, email MEFedMVVM@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Jun 17, 2010 at 9:41 AM

Ok. Thanks