Share via


Geofence.DwellTime Property

Definition

The minimum time that a position has to be inside or outside of the Geofence in order for the notification to be triggered.

public:
 property TimeSpan DwellTime { TimeSpan get(); };
TimeSpan DwellTime();
public System.TimeSpan DwellTime { get; }
var timeSpan = geofence.dwellTime;
Public ReadOnly Property DwellTime As TimeSpan

Property Value

The minimum time that a position has to be inside or outside of the geofence in order for the notification to be triggered.

Windows requirements

Requirements Description
App capabilities
location

Remarks

When creating geofences that use a dwell time, the time span must be greater than 0.

The DwellTime value is used for monitoring both the MonitoredGeofenceStates.Entered and MonitoredGeofenceStates.Exited flags of a single geofence. If you want to provide different dwell time values for entering and exiting, create two Geofence objects—one to track the MonitoredGeofenceStates.Entered state and another to track the MonitoredGeofenceStates.Exited state. Then you can specify a different dwell time for each object.

Applies to