AnsweredAssumed Answered

ViewInsets not centering map point when left panel is present

Question asked by will.lockwood on Nov 7, 2017
Latest reply on Nov 8, 2017 by mnielsen-esristaff

Using ArcGIS Runtime SDK for .NET - Version:, I am trying to use the GeoView.ViewInsets property to properly center a map point when a panel pulls out from the left. I am doing this by setting mapview.ViewInsets = new Thickness(panelWidth, 0, 0, 0), with mapView being a MapView.


However, when I call await mapView.SetViewpointCenterAsync after setting the ViewInsets, it is still centering the map point on the map as if the panel isn't there. When I put a breakpoint there I can see that the ViewInsets have been set to what I want, and even when I change different parts of the ViewInsets it still centers in the same place. 


Is SetViewpointCenterAsync the correct method to call if I want to center a point properly, taking the ViewInsets into account, or is there a different method I should be using? If it is the proper method, what else could be causing this not to center correctly?


I’ve attached a rough illustration of what’s going on.


The black represents the panel

The green represents the map

The red dot represents the map point that should be centered in relation to the map area