NavigationStoppedEventHandler 委托

定义

提供 NavigationStopped 事件的事件数据。

public delegate void NavigationStoppedEventHandler(Platform::Object ^ sender, NavigationEventArgs ^ e);
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(4027678171, 4858, 19853, 139, 38, 179, 131, 208, 156, 43, 60)]
class NavigationStoppedEventHandler : MulticastDelegate
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(4027678171, 4858, 19853, 139, 38, 179, 131, 208, 156, 43, 60)]
public delegate void NavigationStoppedEventHandler(object sender, NavigationEventArgs e);
Public Delegate Sub NavigationStoppedEventHandler(sender As Object, e As NavigationEventArgs)

参数

sender
Object

Platform::Object

IInspectable

附加处理程序的 对象。

e
NavigationEventArgs

事件的事件数据。

属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

示例

下面的代码示例演示如何使用 NavigationStopped 事件。

public MainPage()
{
    this.InitializeComponent();
    this.Frame.NavigationStopped += Frame_NavigationStopped;
}

void Frame_NavigationStopped(object sender, NavigationEventArgs e)
{
    Windows.UI.Popups.MessageDialog dialog = 
        new Windows.UI.Popups.MessageDialog(
        String.Format("Navigation to page: {0} was stopped", 
        e.SourcePageType.ToString()), 
        "Navigation Stopped");
    dialog.ShowAsync();
}

适用于