Here is the ICommand member definition: http://msdn.microsoft.com/en-us/library/system.windows.input.icommand.execute.aspx
Signature:
void Execute( Object parameter )
It is implemented by RoutedCommand with the following signature ( http://msdn.microsoft.com/en-us/library/system.windows.input.routedcommand.execute.aspx ):
public void Execute( Object parameter, IInputElement target ) public void Execute( Object parameter, IInputElement target )
public void Execute( Object parameter, IInputElement target )
How can RoutedCommand implement ICommand with an additional argument (IInputElement) in a member function?
It uses an explicit implementation of the interface to βhideβ ICommand.Execute , which takes a single parameter. The Execute method, which takes two parameters, is not an implementation of ICommand.Execute .
ICommand.Execute
Execute
public class RoutedCommand : ICommand { public void Execute(object parameter, IInputElement target) { // ... } // explicit interface implementation of ICommand.Execute void ICommand.Execute(object parameter) { // ... } }
The ICommand.Execute () interface method is implemented explicitly. Docs are here .
Source: https://habr.com/ru/post/1348064/More articles:Eclipse Debugging Problem - No Source - debuggingTranslate my custom magento module to frontend - magentoRetrieve> 901 rows from a linked SQL Server 2008 server with Active Directory - sql-server-2008Qt - Q_OBJECT vs. #include - c ++IDisposable ASP.net MVC Controller - asp.net-mvcHow to simulate a social graph like flockDB in Google App Engine - google-app-engineAndroid compatible algorithm for PBKDF2WithHmacSHA1 - androidcss center div not working - htmlgrails cannot load jar from maven repo - maven-2What is the advantage of using an interface? - c #All Articles