CoreApplication.LeavingBackground Kejadian

Definisi

Diaktifkan tepat sebelum UI aplikasi terlihat.

// Register
static event_token LeavingBackground(EventHandler<LeavingBackgroundEventArgs> const& handler) const;

// Revoke with event_token
static void LeavingBackground(event_token const* cookie) const;

// Revoke with event_revoker
static CoreApplication::LeavingBackground_revoker LeavingBackground(auto_revoke_t, EventHandler<LeavingBackgroundEventArgs> const& handler) const;
public static event System.EventHandler<LeavingBackgroundEventArgs> LeavingBackground;
function onLeavingBackground(eventArgs) { /* Your code */ }
Windows.ApplicationModel.Core.CoreApplication.addEventListener("leavingbackground", onLeavingBackground);
Windows.ApplicationModel.Core.CoreApplication.removeEventListener("leavingbackground", onLeavingBackground);
- or -
Windows.ApplicationModel.Core.CoreApplication.onleavingbackground = onLeavingBackground;
Public Shared Custom Event LeavingBackground As EventHandler(Of LeavingBackgroundEventArgs) 

Jenis Acara

Persyaratan Windows

Rangkaian perangkat
Windows 10 Anniversary Edition (diperkenalkan dalam 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (diperkenalkan dalam v3.0)

Keterangan

Sebelumnya lokasi terbaik untuk memuat UI ada di penanganan aktivitas yang diaktifkan atau dilanjutkan. Sekarang handler Anda untuk acara LeavingBackground adalah tempat terbaik untuk melakukan pemeriksaan akhir Anda untuk memastikan bahwa UI siap untuk presentasi. Penting untuk memeriksa bahwa aset visual siap pada saat ini karena ini adalah kesempatan terakhir untuk melakukan pekerjaan sebelum aplikasi Anda terlihat oleh pengguna.

Berlaku untuk

Lihat juga