protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e) { progressBar.Visibility = Visibility.Visible; base.OnBackKeyPress(e); wbBackKeyPress.BackKeyPress(webBrowser, e); progressBar.Visibility = Visibility.Collapsed; if (e.Cancel) { return; } string caption = "Thoát"; string appTitle = SystemHelper.GetAppTitle(); string message = "Bạn muốn thoát khỏi " + appTitle + "?"; e.Cancel = MessageBoxResult.Cancel == MessageBox.Show(message, caption, MessageBoxButton.OKCancel); base.OnBackKeyPress(e); }