You must Sign In to post a response.
  • Category: Silverlight

    What is the difference between ICommand and RelayCommand?


    Are you looking for information on Silver light, MVVM architecture? Want to know what is the difference between ICommand and RelayCommand? Read this thread to learn more about ICommand and RelayCommand examples.



    Hi,I am working on Silver light,MVVM architecture, can any one tell the difference between ICommand and RelayCommand, when we go for which scenario?
  • #719854
    A RelayCommand is a type of command which implements the Interface ICOmmand. ICOmmand is an Interface which must be implemented by all the commnad event in WPF or silverlight

    Relat command requires two basic information:

    1.What code should run when the command is executed (the _execute action)

    2.What code should run to determine if this command can be executed (the _canExecute predicate)

    Hope you have got the idea.

    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #720213
    Hi,
    ICommand can be used as WPF command. You can pass methods as parameters to the RelayCommand constructor.

    Best regards,
    Prachi Kulkarni.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.