GeofenceMonitor.StatusChanged 事件
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當 GeofenceMonitor的狀態變更時引發。
// 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)
事件類型
TypedEventHandler<GeofenceMonitor,IInspectable>
Windows 需求
應用程式功能 |
location
|
備註
使用地理柵欄時,請使用GeofenceMonitor的 StatusChanged 事件來監視位置許可權的變更,而不是來自 Geolocator類別的StatusChanged事件。 Disabled 的 GeofenceMonitorStatus相當於 **Disabled **PositionStatus - 兩者都表示應用程式沒有存取位置的許可權。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應