问题
I try to understand the ICommand from wpf.
In my Event class I implement the ICommand and their methods.
one method is the Execute:
public void Execute(object parameter)
{
//Do something
}
now is my question: what value contains the parameter parameter
from Execute
?
回答1:
That value depends on the value you pass to the command.
like a sniplet:
Command="{Binding CalculateCommand}" CommandParameter="LCM"/>
Look here: Command Binding with Parameter Passing for more details.
来源:https://stackoverflow.com/questions/11187052/icommand-method-execute-parameter-value