private Task SetViewAsync(Esri.ArcGISRuntime.Geometry.Geometry boundingGeometry, double margin = 20)
{
if (Controller == null || boundingGeometry == null)
return Task.FromResult(false);
var extent = boundingGeometry.Extent;
// set the padding around the extent - if the side pane is open add its width to the left margin
Thickness padding = new Thickness((IsSidePaneOpen ? _collapsibleTabWidth : 0) + margin, margin, margin, margin);
return Controller.SetViewAsync(extent, padding);
}