private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            locator.MovementThreshold = 5;
            locator.PositionChanged += LocatorPositionChanged;

            ViewModel.MapZoomChanged += ViewModel_MapZoomChanged;
            ViewModel.AlarmsChanged += ViewModel_AlarmsChanged;
            ViewModel.AlarmScreenRequired += ViewModel_AlarmScreenRequired;
            ViewModel.AddScreenRequired += ViewModel_AddScreenRequired;

            GeofenceMonitor.Current.GeofenceStateChanged += OnGeofenceStateChanged;

            ViewModel.OnStart();
        }
        async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            ViewModel.Saved += OnSaved;
            ViewModel.PropertyChanged += ViewModel_PropertyChanged;

            if (e.NavigationParameter != null)
            {
                var currentPosition = e.NavigationParameter as Tuple<double, double>;
                await Map.TrySetViewAsync(new Geopoint(new BasicGeoposition { Latitude = currentPosition.Item1, Longitude = currentPosition.Item2 }), 16D);
            }
            else
            {
                var locator = new Geolocator();
                locator.DesiredAccuracyInMeters = 50;

                var position = await locator.GetGeopositionAsync();
                await Map.TrySetViewAsync(position.Coordinate.Point, 16D);
            }
        }
		private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
		{
			ViewModel.ActiveAlarm = e.NavigationParameter as AlarmItemViewModel;
		}