ArcGIS Pro 2.8 API Reference Guide
QueryExtent Method

ArcGIS.Desktop.Mapping Namespace > Layer Class : QueryExtent Method
(Optional) -true- computes extent of the layer using largest symbol size.
-false- returns the underlying FeatureClass' full extent.
(default value = false)
Returns extent of the layer optionally taking symbol size in account. This method must be called on the MCT. Use QueuedTask.Run
Syntax
public Envelope QueryExtent( 
   bool includeSymbolSize
)
Public Function QueryExtent( _
   Optional ByVal includeSymbolSize As Boolean _
) As Envelope

Parameters

includeSymbolSize
(Optional) -true- computes extent of the layer using largest symbol size.
-false- returns the underlying FeatureClass' full extent.
(default value = false)

Return Value

An envelope that covers all features of the layer.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
If you want to get extent to zoom to the layer's extent but do not want to see features cut off on edges, you should use
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Layer Class
Layer Members