Xamarin Forms, Detecting map Scrolling, Zooming and etc event

Viewed 776

I'm using Xamarin Forms Maps official nuget library, everything works good and I handle finish zooming and scrolling map via this code:

map.PropertyChanged += (sender, args) =>
        {
            var m = sender as Map;
            if (m?.VisibleRegion == null) return;
            SearchButton.IsVisible = true;
        };
        map.PropertyChanging += (sender, args) => { SearchButton.IsVisible = false; };

But I want to do some stuff when user starts scrolling or zooming map! I didn't find it and also PropertyChanging not called when user is surfing the map, it's calling just before PropertyChanged.

1 Answers

I think in Xamarin.Forms your options are limited, so your best option would be to either create a custom renderer and abstract the gestures into Xamarin.Forms, or create your own custom canvas, render the map onto it and that way you would have full control.

Related