WebView.LoadCompleted 事件

定义

注意

LoadCompleted 可能会在Windows 8.1后更改或不可用。 请改用 NavigationCompleted

在顶级导航完成且内容加载到 WebView 控件时或在加载过程中发生错误时发生。

public:
 virtual event LoadCompletedEventHandler ^ LoadCompleted;
/// [add: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
/// [remove: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Foundation.UniversalApiContract)]
// Register
event_token LoadCompleted(LoadCompletedEventHandler const& handler) const;

// Revoke with event_token
void LoadCompleted(event_token const* cookie) const;

// Revoke with event_revoker
WebView::LoadCompleted_revoker LoadCompleted(auto_revoke_t, LoadCompletedEventHandler const& handler) const;
/// [add: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
/// [remove: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
// Register
event_token LoadCompleted(LoadCompletedEventHandler const& handler) const;

// Revoke with event_token
void LoadCompleted(event_token const* cookie) const;

// Revoke with event_revoker
WebView::LoadCompleted_revoker LoadCompleted(auto_revoke_t, LoadCompletedEventHandler const& handler) const;
[add: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
[remove: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Foundation.UniversalApiContract))]
public event LoadCompletedEventHandler LoadCompleted;
[add: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
[remove: Windows.Foundation.Metadata.Deprecated("LoadCompleted may be altered or unavailable for releases after Windows 8.1. Instead, use NavigationCompleted.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Foundation.UniversalApiContract")]
public event LoadCompletedEventHandler LoadCompleted;
function onLoadCompleted(eventArgs) { /* Your code */ }
webView.addEventListener("loadcompleted", onLoadCompleted);
webView.removeEventListener("loadcompleted", onLoadCompleted);
- or -
webView.onloadcompleted = onLoadCompleted;
Public Custom Event LoadCompleted As LoadCompletedEventHandler 
<WebView LoadCompleted="eventhandler"/>

事件类型

属性

适用于