private HookUpCommand ( ICommand oldCommand, ICommand newCommand ) : void | ||
oldCommand | ICommand | The old command. |
newCommand | ICommand | The new command. |
return | void |
private void HookUpCommand( ICommand oldCommand, ICommand newCommand )
{
EventHandler handler = new EventHandler( CanExecuteChanged );
canExecuteChangedHandler = handler;
if( newCommand != null )
newCommand.CanExecuteChanged += canExecuteChangedHandler;
}