/// <summary> /// When closing the window, you have to automatically reject the transfer request /// </summary> /// <param name="sender">The sender</param> /// <param name="e">The event arguments</param> private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { // NOTE: if you click on the Reject transfer button, this function will be called too, // calling reject a second time. But this time, window.close won't be called again. ViewModel.Cancel(true); }
/// <summary> /// Executes the command /// </summary> /// <param name="parameter"></param> public void Execute(object parameter) { ViewModel.Cancel(); }