I would like to disable the zoom that occurs when you double click the map.
I found a InteractionOptions. So I wrote some code, but is not working.
<sample>
MyMapView. InteractionOptions. IsZoomEnabled=false;
->this code is error.[System. NullReferenceException]
Is there any workaround for this problem?
Solved! Go to Solution.
Hi SK,
First you need to create MapViewInteractionOptions() instance and set the navigation property as below:
// code based
var interactions = new MapViewInteractionOptions() ;
interactions.IsZoomEnabled = false;
MyMapView.InteractionOptions = interactions;
OR
If you would like to do through XAML, you could create the instance in XAML :
<esri:MapView x:Name="MyMapView">
<esri:MapView.InteractionOptions>
<esri:MapViewInteractionOptions IsZoomEnabled = false/>
</esri:MapView.InteractionOptions>
</esri:MapView>
Hope that helps.
Nagma
Hi SK,
First you need to create MapViewInteractionOptions() instance and set the navigation property as below:
// code based
var interactions = new MapViewInteractionOptions() ;
interactions.IsZoomEnabled = false;
MyMapView.InteractionOptions = interactions;
OR
If you would like to do through XAML, you could create the instance in XAML :
<esri:MapView x:Name="MyMapView">
<esri:MapView.InteractionOptions>
<esri:MapViewInteractionOptions IsZoomEnabled = false/>
</esri:MapView.InteractionOptions>
</esri:MapView>
Hope that helps.
Nagma
Hi Nagma.
Thank you very much for your advice.
I could solve the problem by following your advice to revise some code.