Show / Hide Table of Contents

Property ViewInsets

ViewInsets

Gets or sets the viewport inset padding.

Declaration
public Thickness ViewInsets { get; set; }
Property Value
Type Description
Thickness

The viewport inset padding.

Remarks

The ViewInsets reduces the "safe area" of the view, so zoom-to, center, rotation etc will be appropriately offset when panels are partially overlaying the view. For example if you pull out a side-panel that partially covers the map's left side and want to zoom to a geometry without the side-panel blocks the view of the panel, add some left-view padding equivalent to the width of the side-panel. Ex: mapView.ViewInsets = new Thickness(sidePanel.Width, 0, 0, 0);.

If you just want to zoom to a geometry and leave a bit of padding around it, use the SetViewpointGeometryAsync(Geometry, Double) method instead.

The ViewInsets setting currently only applies to MapView, and is ignored on SceneView.

See Also
SetViewpointGeometryAsync(Geometry, Double)

Applies to

Platforms and versions
TargetVersions
.NET 6.0 Windows100.13 - 200.0
In This Article
Back to top Copyright © 2022 Esri.