GeofenceMonitor.StatusChanged Kejadian

Definisi

Muncul ketika status GeofenceMonitor telah berubah.

// Register
event_token StatusChanged(TypedEventHandler<GeofenceMonitor, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
GeofenceMonitor::StatusChanged_revoker StatusChanged(auto_revoke_t, TypedEventHandler<GeofenceMonitor, IInspectable const&> const& handler) const;
public event TypedEventHandler<GeofenceMonitor,object> StatusChanged;
function onStatusChanged(eventArgs) { /* Your code */ }
geofenceMonitor.addEventListener("statuschanged", onStatusChanged);
geofenceMonitor.removeEventListener("statuschanged", onStatusChanged);
- or -
geofenceMonitor.onstatuschanged = onStatusChanged;
Public Custom Event StatusChanged As TypedEventHandler(Of GeofenceMonitor, Object) 

Jenis Acara

Persyaratan Windows

Kemampuan aplikasi
location

Keterangan

Saat menggunakan geofence, gunakan peristiwa StatusChanged GeofenceMonitor untuk memantau perubahan izin lokasi alih-alih peristiwa StatusChanged dari kelas Geolocator . GeofenceMonitorStatus dari Dinonaktifkan setara dengan **Disabled **PositionStatus - keduanya menunjukkan bahwa aplikasi tidak memiliki izin untuk mengakses lokasi.

Berlaku untuk

Lihat juga