本文整理匯總了C#中System.Windows.Navigation.NavigationFailedEventArgs類的典型用法代碼示例。如果您正苦於以下問題:C# NavigationFailedEventArgs類的具體用法?C# NavigationFailedEventArgs怎麽用?C# NavigationFailedEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NavigationFailedEventArgs類屬於System.Windows.Navigation命名空間,在下文中一共展示了NavigationFailedEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ContentFrame_NavigationFailed
// If an error occurs during navigation, show an error window
private void ContentFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
e.Handled = true;
ChildWindow errorWin = new ErrorWindow(e.Uri);
errorWin.Show();
}
示例2: RootFrame_NavigationFailed
// Code to execute if a navigation fails
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached) {
// A navigation has failed; break into the debugger
System.Diagnostics.Debugger.Break();
}
}
示例3: Application_NavigationFailed
private void Application_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (e.Exception is System.Net.WebException) {
MessageBox.Show("Site " + e.Uri + " not available :(");
e.Handled = true;
}
}
示例4: OnBrowserNavigationFailed
/// <summary>Callback of browser navigation failed.</summary>
private void OnBrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (!tcsAuthorizationCodeResponse.Task.IsCompleted)
{
tcsAuthorizationCodeResponse.SetException(e.Exception);
}
}
示例5: RootFrame_NavigationFailed
private void RootFrame_NavigationFailed( object sender, NavigationFailedEventArgs e )
{
if ( Debugger.IsAttached )
{
Debugger.Break();
}
}
示例6: NavigationFailed
// Code to execute if a navigation fails
protected virtual void NavigationFailed(object sender, NavigationFailedEventArgs e)
{
//if (System.Diagnostics.Debugger.IsAttached)
//{
// // A navigation has failed; break into the debugger
// System.Diagnostics.Debugger.Break();
//}
}
示例7: RootFrame_NavigationFailed
// Код для выполнения в случае ошибки навигации
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// Ошибка навигации; перейти в отладчик
Debugger.Break();
}
}
示例8: browserControl_NavigationFailed
void browserControl_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
WebBrowserNavigationException ex = e.Exception as WebBrowserNavigationException;
uint error = ex != null ? (uint)ex.StatusCode : 0u;
WebAuthenticationResult result = new WebAuthenticationResult("", WebAuthenticationStatus.ErrorHttp, error);
WebAuthenticationResultSource.TrySetResult(result);
e.Handled = true;
}
示例9: RootFrame_NavigationFailed
// Code à exécuter en cas d'échec d'une navigation
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// Échec d'une navigation ; arrêt dans le débogueur
Debugger.Break();
}
}
示例10: webBrowser_NavigationFailed
private void webBrowser_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
e.Handled = true;
webBrowser.NavigateToString("<html><body>I'm having trouble loading " +
"the web applicaiton right now. Are you in airplane mode?<br/>" +
"<a href='" + e.Uri.ToString() + "'>Try again.</a>" +
"</body></html>");
}
示例11: RootFrame_NavigationFailed
// Code to execute if a navigation fails
void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
}
示例12: RootFrame_NavigationFailed
// 導航失敗時執行的代碼
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached)
{
// 導航已失敗;強行進入調試器
System.Diagnostics.Debugger.Break();
}
}
示例13: Frame_NavigationFailed
private void Frame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
//if (e.Exception is WebException)
{
string s = LanguageDictionary.Current.Translate<string>("NavigationError", "Text", "Error opening ") + e.Uri.ToString();
MessageBox.Show(s, App.Name, MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
}
}
示例14: BrowserNavigationFailed
void BrowserNavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (completed || e.Exception == null)
return;
string statusCode = "no status code given";
if (e.Exception is WebBrowserNavigationException)
statusCode = ((WebBrowserNavigationException)e.Exception).StatusCode.ToString();
MessageBox.Show(string.Format("{0} ({1})", e.Exception.Message, statusCode), "Error logging in", MessageBoxButton.OK);
}
示例15: App_NavigationFailed
private void App_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (e.Exception is System.Net.WebException)
{
MessageBox.Show("Website " + e.Uri.ToString() + " cannot be reached.");
// Neutralize the erorr so the application continues running.
e.Handled = true;
}
}