locked
what is realycommand RRS feed

  • Question

  • what is realycommand and how to use it ?

    simply explain

    Monday, June 9, 2014 9:42 AM

Answers

  • It's a typical implementation of the ICommand interface that is used in a MVVM application. It takes a lambda expression that is executed when the command is invoked, i.e. its Execute method is invoked. There are no RelayCommand class available out-of-the-box, but you can implement your own one or use one from some MVVM framework like for example MVVMLight.

    Please refer to the following article for more information and samples about how to implement it and use it: http://msdn.microsoft.com/en-us/magazine/dn237302.aspx

    Monday, June 9, 2014 9:56 AM
  • There is a RelayCommand implementation in the standard templates. Take a look at the back Button's implementation to see how it wires up the NavigationHelper.GoBackCommand.

    --Rob

    Monday, June 9, 2014 1:45 PM
    Moderator

All replies

  • It's a typical implementation of the ICommand interface that is used in a MVVM application. It takes a lambda expression that is executed when the command is invoked, i.e. its Execute method is invoked. There are no RelayCommand class available out-of-the-box, but you can implement your own one or use one from some MVVM framework like for example MVVMLight.

    Please refer to the following article for more information and samples about how to implement it and use it: http://msdn.microsoft.com/en-us/magazine/dn237302.aspx

    Monday, June 9, 2014 9:56 AM
  • There is a RelayCommand implementation in the standard templates. Take a look at the back Button's implementation to see how it wires up the NavigationHelper.GoBackCommand.

    --Rob

    Monday, June 9, 2014 1:45 PM
    Moderator