共用方式為


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();
}

適用於