public override Envelope ToGeometry()
Public Overrides NotOverridable Function ToGeometry() As Envelope
Return Value
An Envelope
public override Envelope ToGeometry()
Public Overrides NotOverridable Function ToGeometry() As Envelope
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
// 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(); } }); // builderEx constructors don't need to run on the MCT. EnvelopeBuilderEx builderEx = new EnvelopeBuilderEx(minPt, maxPt); envelope = builderEx.ToGeometry() as Envelope; // builderEx convenience methods don't need to run on the MCT envelope = EnvelopeBuilderEx.CreateEnvelope(minPt, maxPt);
Target Platforms: Windows 10, Windows 8.1