本文整理汇总了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;
}
}