Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SurfaceDialMapControlZoom
readonly RadialController _controller;
public MapPagePage()
{
locationService = new LocationService();
Center = new Geopoint(defaultPosition);
ZoomLevel = DefaultZoomLevel;
InitializeComponent();
_controller = RadialController.CreateForCurrentView();
_controller.RotationResolutionInDegrees = 0.2;
_controller.UseAutomaticHapticFeedback = false;
var myItem = RadialControllerMenuItem.CreateFromFontGlyph("El Bruno - Maps", "\xE128", "Segoe MDL2 Assets" );
_controller.Menu.Items.Add(myItem);
_controller.ButtonClicked += ControllerButtonClicked;
_controller.RotationChanged += ControllerRotationChanged;
}
private void ControllerRotationChanged(RadialController sender, RadialControllerRotationChangedEventArgs args)
{
Debug.WriteLine($"{mapControl.ZoomLevel} - {args.RotationDeltaInDegrees}");
mapControl.ZoomLevel = mapControl.ZoomLevel + args.RotationDeltaInDegrees;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment