Property ViewInsets
ViewInsets
Gets or sets the viewport inset padding.
Declaration
public Thickness ViewInsets { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.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
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Windows | 100.13 - 200.6 |