windowsforms-devexpress-dot-xtramap-dot-mapcontrol-dot-zoomtofitlayeritems-x28-system-dot-double-x29.md
Zooms the map to fit items contained by the MapControl.Layers property.
Namespace : DevExpress.XtraMap
Assembly : DevExpress.XtraMap.v25.2.dll
NuGet Package : DevExpress.Win.Map
public void ZoomToFitLayerItems(
double paddingFactor
)
Public Sub ZoomToFitLayerItems(
paddingFactor As Double
)
| Name | Type | Description |
|---|---|---|
| paddingFactor | Double |
A Double object, which tunes the border size around visible map items.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the ZoomToFitLayerItems(Double) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-map-customize-coordinate-systems-of-a-map/CS/CoordinateSystems/Form1.cs#L61
void DataLayer_DataLoaded(object sender, DataLoadedEventArgs e) {
mapControl.ZoomToFitLayerItems(0.4);
}
void layer_DataLoaded(object sender, DataLoadedEventArgs e) {
mapControl1.ZoomToFitLayerItems(0.4);
}
winforms-map-customize-coordinate-systems-of-a-map/VB/CoordinateSystems/Form1.vb#L61
Private Sub DataLayer_DataLoaded(ByVal sender As Object, ByVal e As DataLoadedEventArgs)
mapControl.ZoomToFitLayerItems(0.4)
End Sub
Private Sub layer_DataLoaded(ByVal sender As Object, ByVal e As DataLoadedEventArgs)
mapControl1.ZoomToFitLayerItems(0.4)
End Sub
See Also