private void Control_ActualCameraChanging(MapControl sender, MapActualCameraChangingEventArgs args) { MessagingCenter.Send(new CameraPositionUpdatingMessage() { zoom = sender.ZoomLevel }, "Map_CameraPositionUpdating"); }
private void OnMapCameraChanging(MapControl sender, MapActualCameraChangingEventArgs args) { if (this.isDragging) { // Reset the map center to the stored center value. // This prevents the map from panning when we drag across it. this.map.Center = this.center; } }
MapCameraChangeReason IMapActualCameraChangingEventArgsResolver.ChangeReason(MapActualCameraChangingEventArgs e) => e.ChangeReason;
MapCamera IMapActualCameraChangingEventArgsResolver.Camera(MapActualCameraChangingEventArgs e) => e.Camera;
/// <summary> /// Indicates the reason the <see cref="MapControl.ActualCameraChanging"/> event was triggered. /// </summary> /// <param name="e">The requested <see cref="MapActualCameraChangingEventArgs"/>.</param> /// <returns>The reason the <see cref="MapControl.ActualCameraChanging"/> event was triggered.</returns> public static MapCameraChangeReason ChangeReason(this MapActualCameraChangingEventArgs e) => Resolver.ChangeReason(e);
/// <summary> /// Gets the position of the map's camera before it started moving. /// </summary> /// <param name="e">The requested <see cref="MapActualCameraChangingEventArgs"/>.</param> /// <returns>The position of the map's camera before it started moving.</returns> public static MapCamera Camera(this MapActualCameraChangingEventArgs e) => Resolver.Camera(e);