Parameters
- minPoint
- Lower left corner of the envelope.
- maxPoint
- Upper right corner of the envelope.
Exception | Description |
---|---|
NullGeometryObjectException | Indicates the geometry is null or empty. |
System.InvalidOperationException | Incompatible spatial references. The spatial references of the MapPoints do not match. |
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
System.ArgumentNullException | minPoint or maxPoint is null. |
// Use a builder convenience method or use a builder constructor. MapPoint minPt = MapPointBuilder.CreateMapPoint(1.0, 1.0); MapPoint maxPt = MapPointBuilder.CreateMapPoint(2.0, 2.0); // Builder convenience methods don't need to run on the MCT. Envelope envelope = EnvelopeBuilder.CreateEnvelope(minPt, maxPt); // Builder constructors need to run on the MCT. ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => { using (EnvelopeBuilder builder = new EnvelopeBuilder(minPt, maxPt)) { // do something with the builder envelope = builder.ToGeometry(); } });
Target Platforms: Windows 10, Windows 8.1, Windows 7