protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { base.OnBackKeyPress(e); if (MessageBox.Show("Sicuro di voler uscire?", "Esci", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { Application.Current.Terminate(); } else { e.Cancel = true; } }
Nessun commento:
Posta un commento