private void m_mapView_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e) { //If user stopped navigating and we're not in the correct autopan mode, //restore autopan after the set delay. if (IsEnabled && e.PropertyName == "IsNavigating") { if (m_mapView.LocationDisplay != null && m_mapView.LocationDisplay.AutoPanMode != PanMode) { if (!m_mapView.IsNavigating) { m_timer.Invoke(TimeSpan.FromSeconds(DelayInSeconds)); } else { m_timer.Cancel(); } } } }
private void M_mapView_NavigationCompleted(object sender, EventArgs e) { //If user stopped navigating and we're not in the correct autopan mode, //restore autopan after the set delay. if (IsEnabled && !m_mapView.IsNavigating) { if (m_mapView.LocationDisplay != null && m_mapView.LocationDisplay.AutoPanMode != PanMode) { if (!m_mapView.IsNavigating) { m_timer.Invoke(TimeSpan.FromSeconds(DelayInSeconds)); } else { m_timer.Cancel(); } } } }