# Class EnvelopeBuilder

Builder for creating Envelope instances.

**Namespace**: Esri.ArcGISRuntime.Geometry

**Assembly**: Esri.ArcGISRuntime.dll

##### Syntax

`public sealed class EnvelopeBuilder : GeometryBuilder<Envelope>`

**Remarks**

Use the EnvelopeBuilder Class to create and/or modify an Envelope shape. The builder is best suited for editing workflows where the user may be adding, inserting or removing parts of an Envelope geometry interactively. Envelopes are based upon the parent Geometry Class. The Geometry Class is immutable which means that you can not change its shape once it is created. Hence the EnvelopeBuilder provides the way to make changes when working with an Envelope. Use the ToGeometry() Method to get the Envelope geometry from the builder.

### Constructors

Name | Description |
---|---|

EnvelopeBuilder(Envelope) | Initializes a new instance of the EnvelopeBuilder class from an existing Envelope. |

EnvelopeBuilder(MapPoint, MapPoint) | Initializes a new instance of the EnvelopeBuilder class from two diagonal corner MapPoints. |

EnvelopeBuilder(MapPoint, Double, Double) | Initializes a new instance of the EnvelopeBuilder class from a center point, with a defined width and height. |

EnvelopeBuilder(MapPoint, Double, Double, Double) | Initializes a new instance of the EnvelopeBuilder class from a center point, with defined width, height, and depth. |

EnvelopeBuilder(SpatialReference) | Initializes a new instance of the EnvelopeBuilder class with a SpatialReference and empty geometry. |

EnvelopeBuilder(Double, Double, Double, Double) | Initializes a new instance of the EnvelopeBuilder class from given diagonal x/y corner coordinates. |

EnvelopeBuilder(Double, Double, Double, Double, SpatialReference) | Initializes a new instance of the EnvelopeBuilder class from given diagonal x/y corner coordinates and a SpatialReference. |

### Properties

Name | Description |
---|---|

Center | Gets the center point of the builder's envelope. |

Depth | Gets the depth (ZMax - ZMin) for this builder's envelope. |

Height | Gets the height of the builder's envelope (along Y-axis). |

MMax | Gets or sets the maximum M (measure) value for this builder's envelope. |

MMin | Gets or sets the minimum M (measure) value for this builder's envelope. |

Width | Gets the width of the builder's envelope (along X-axis). |

XMax | Gets or sets the max coordinate along X-axis (upper right corner) for this builder's envelope. |

XMin | Gets or sets the min coordinate along X-axis (lower left corner) for this builder's envelope. |

YMax | Gets or sets the max coordinate along Y-axis (upper right corner) for this builder's envelope. |

YMin | Gets or sets the min coordinate along Y-axis (lower left corner) for this builder's envelope. |

ZMax | Gets or sets the max coordinate along Z-axis for this builder's envelope. |

ZMin | Gets or sets the min coordinate along Z-axis for this builder's envelope. |

### Methods

Name | Description |
---|---|

CenterAt(MapPoint) | Centers the envelope over the given MapPoint. |

ChangeAspectRatio(Double, Double) | Adjust the envelope's aspect ratio to match the ratio of the given width and height. |

CreateWithM(Double, Double, Double, Double, Double, Double) | Creates an EnvelopeBuilder based on the given x, y, and m values. |

CreateWithM(Double, Double, Double, Double, Double, Double, SpatialReference) | Creates an EnvelopeBuilder based on the given x, y, and m values in the given SpatialReference. |

CreateWithM(Double, Double, Double, Double, Double, Double, Double, Double) | Creates an EnvelopeBuilder based on the given x, y, z, and m values. |

CreateWithM(Double, Double, Double, Double, Double, Double, Double, Double, SpatialReference) | Creates an EnvelopeBuilder based on the given x, y, z, and m values in the given SpatialReference. |

Expand(MapPoint, Double) | Scales the envelope around an anchor point by the given factor. |

Expand(Double) | Scales the envelope by the given factor. |

OffsetBy(Double, Double) | Moves the builder's envelope by the given offsets in the x and y dimensions. |

SetM(Double, Double) | Set both M (measure) values for the builder's envelope. |

SetXY(Double, Double, Double, Double) | Set the x,y coordinates for the builder's envelope. |

SetZ(Double, Double) | Set both Z-values for the builder's envelope. |

UnionOf(Envelope) | Finds the union of this builder's envelope and the given envelope. This builder's envelope is updated with the result. |

UnionOf(MapPoint) | Finds the union of this envelope and the given MapPoint. This builder's envelope is updated with the result. |

### Applies to

Target | Versions |
---|---|

.NET Standard 2.0 | 100.3 - 100.14 |

.NET 6.0 | 100.13 - 100.14 |

.NET 6.0 Windows | 100.13 - 100.14 |

.NET Framework | 100.0 - 100.14 |

.NET 5 | 100.10 - 100.12 |

.NET Core 3.1 | 100.7 - 100.12 |

Xamarin.Android | 100.0 - 100.14 |

Xamarin.iOS | 100.0 - 100.14 |

UWP | 100.0 - 100.14 |