mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-05 16:06:10 +02:00
* Reset branch for WPF changes * Convert BMP to PNG; fix link-out-of-scope err * Add snippets for WPF... 6794 files!!!! * Add missing snippets * update file updated between migration * Fix paths to include * update breadcrumb and toc * fix index links * fix index links * fix index links * fix markdown
24 lines
1.2 KiB
Markdown
24 lines
1.2 KiB
Markdown
---
|
|
title: "How to: Stop a Page from Loading"
|
|
ms.date: "03/30/2017"
|
|
dev_langs:
|
|
- "csharp"
|
|
- "vb"
|
|
helpviewer_keywords:
|
|
- "pages [WPF], stopping from loading"
|
|
- "methods [WPF], Stoploading"
|
|
- "events [WPF], NavigationStopped"
|
|
- "NavigationStopped properties [WPF]"
|
|
- "stopping pages from loading [WPF]"
|
|
- "loading [WPF], stopping"
|
|
ms.assetid: e2b695b0-517e-462c-8ccf-90cc8d6ba864
|
|
---
|
|
# How to: Stop a Page from Loading
|
|
This example shows how to call the <xref:System.Windows.Navigation.NavigationWindow.StopLoading%2A> method to stop navigation to content before it has finished being downloaded.
|
|
|
|
## Example
|
|
<xref:System.Windows.Navigation.NavigationWindow.StopLoading%2A> stops the download of the requested content, and causes the <xref:System.Windows.Navigation.NavigationWindow.NavigationStopped> event to be raised.
|
|
|
|
[!code-csharp[HOWTONavigationSnippets#NavigateStopLoadingCODE](~/samples/snippets/csharp/VS_Snippets_Wpf/HOWTONavigationSnippets/CSharp/MainWindow.xaml.cs#navigatestoploadingcode)]
|
|
[!code-vb[HOWTONavigationSnippets#NavigateStopLoadingCODE](~/samples/snippets/visualbasic/VS_Snippets_Wpf/HOWTONavigationSnippets/visualbasic/mainwindow.xaml.vb#navigatestoploadingcode)]
|