{"id":2048452,"date":"2023-08-23T08:00:57","date_gmt":"2023-08-23T15:00:57","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2048452"},"modified":"2024-04-12T01:15:46","modified_gmt":"2024-04-12T08:15:46","slug":"migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","title":{"rendered":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor"},"author":6351,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[738191],"tags":[771422,377652,28391,759822],"industry":[],"product":[761642,769142,769162,768902,769152,768912],"class_list":["post-2048452","blog","type-blog","status-publish","format-standard","hentry","category-developers","tag-draw","tag-edit","tag-geometry","tag-sketch","product-platform","product-sdk-net","product-sdk-java","product-sdk-kotlin","product-sdk-qt","product-sdk-swift"],"acf":{"authors":[{"ID":6351,"user_firstname":"Jennifer","user_lastname":"Nery","nickname":"Jennifer Nery","user_nicename":"jenniferdnery","display_name":"Jennifer Nery","user_email":"JNery@esri.com","user_url":"","user_registered":"2018-03-02 00:18:18","user_description":"Jennifer Nery is a Principal Software Development Engineer for the ArcGIS Maps SDK for .NET with over 15 years of experience in designing and developing APIs, toolkits, samples, and applications for desktop and mobile. Jennifer actively participates in the full development of utility networks, enhancement of feature layers, expanding support for branch versioning and session management, and is passionate about seeing these awesome features come to life for developers in ArcGIS Maps SDK for Native Apps!","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/01\/Profile2-465x465.jpeg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"short_description":"Learn how you can migrate your legacy SketchEditor code to leverage the rich capabilities in the new GeometryEditor.","flexible_content":[{"acf_fc_layout":"content","content":"<p><em>Code examples for this blog are written in C# using ArcGIS Maps SDK for .NET; but the Geometry Editor concepts all apply to Java, Kotlin, Qt, and Swift.<\/em><\/p>\n<p>The <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/developers\/announcements\/whats-new-in-arcgis-maps-sdks-for-native-apps-200-2\/\">200.2 release<\/a> of the ArcGIS Maps SDKs for Native Apps paves the way to a brand new <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.html\">GeometryEditor<\/a> in .NET. Learning from developing the <a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchEditor.html\">SketchEditor<\/a>, we made significant improvements in its replacement. It is now built from the same core C++ to provide your applications a consistent, intuitive, easy to use, highly customizable, more reliable, and performant editor. This single core implementation will enable us to fulfill your most requested enhancements, like snapping and curve editing, more efficiently across all the Native SDKs.<\/p>\n<p>In this article, I will cover the following topics to help you decide when and how to navigate the code migration process for .NET:<\/p>\n<ul>\n<li><a href=\"#equivalent\">Functional equivalence<\/a><\/li>\n<li><a href=\"#flexible\">Improvements<\/a><\/li>\n<li><a href=\"#dotnet\">.NET support<\/a><\/li>\n<\/ul>\n"},{"acf_fc_layout":"content","content":"<h2><a id=\"equivalent\"><\/a><strong><u>Functional equivalence<\/u><\/strong><\/h2>\n"},{"acf_fc_layout":"content","content":"<p>The <em>SketchEditor<\/em> is deprecated in the 200.2 release, replaced with an API that has a set of comparable functionalities.<\/p>\n<p>To name a few, the <em>GeometryEditor <\/em>enables you to:<\/p>\n<ul>\n<li>interactively or programmatically create or update a point, polyline, polygon, and multipoint geometries<\/li>\n<li>edit vertices, draw in freehand mode, or start with predefined shapes<\/li>\n<li>transform geometries by inserting or deleting vertices, moving, rotating, or scaling the geometries<\/li>\n<li>undo and redo any edit made on the geometry and be notified when the geometry changes<\/li>\n<li>update the visibility and appearance of the tool handles used in vertex editing, rotation, and scale<\/li>\n<\/ul>\n<p>You will notice that the start methods take remarkably similar parameters. There are two main groups: <strong><em>Draw<\/em><\/strong>, creates a new geometry based on type, and <strong><em>edit<\/em><\/strong><em>,<\/em> updates a specified geometry. The <em>GeometryEditor<\/em> in support of these operations responds to the same map interaction using mouse, stylus, or touch devices; and similar routine calls for insert, move, delete, and replace.<\/p>\n<p>The following table highlights the equivalent support for drawing and editing in the <em>GeometryEditor<\/em>.<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"70%\">\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchEditor.html\">SketchEditor<\/a><\/strong><\/p>\n<\/td>\n<td width=\"30%\">\n<p style=\"text-align: center;\"><strong><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.html\">GeometryEditor<\/a><\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" width=\"100%\">\n<p style=\"text-align: center;\"><strong><em>Draw<\/em><\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"70%\">StartAsync(SketchCreationMode, bool) : Task&lt;Geometry&gt;<\/td>\n<td width=\"30%\">Start(GeometryType)<\/td>\n<\/tr>\n<tr>\n<td width=\"70%\">StartAsync(SketchCreationMode, SketchEditConfiguration) : Task&lt;Geometry&gt;<\/td>\n<td width=\"30%\"><\/td>\n<\/tr>\n<tr>\n<td colspan=\"2\" width=\"100%\">\n<p style=\"text-align: center;\"><strong><em>Edit<\/em><\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"70%\">StartAsync(Geometry) : Task&lt;Geometry&gt;<\/td>\n<td width=\"30%\">Start(Geometry)<\/td>\n<\/tr>\n<tr>\n<td width=\"70%\">StartAsync(Geometry, SketchCreationMode) : Task&lt;Geometry&gt;<\/td>\n<td width=\"30%\"><\/td>\n<\/tr>\n<tr>\n<td width=\"70%\">StartAsync(Geometry, SketchCreationMode, SketchEditConfiguration) : Task&lt;Geometry&gt;<\/td>\n<td width=\"30%\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You will notice that the <em>SketchEditConfiguration<\/em> parameter remains an accessible configuration from the <em>Tool<\/em> property in the <em>GeometryEditor<\/em>. The <em>SketchEditor<\/em> and its supporting classes have a counterpart in the <em>GeometryEditor<\/em>, and they are as follows:<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td width=\"50%\">\n<p style=\"text-align: center;\"><strong>Old<\/strong><\/p>\n<\/td>\n<td width=\"50%\">\n<p style=\"text-align: center;\"><strong>New<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchEditor.html\">SketchEditor<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.html\">GeometryEditor<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchCreationMode.html\">SketchCreationMode<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Geometry.GeometryType.html\">GeometryType<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.ShapeToolType.html\">ShapeToolType<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.FreehandTool.html\">FreehandTool<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchEditConfiguration.html\">SketchEditConfiguration<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.InteractionConfiguration.html\">InteractionConfiguration<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchStyle.html\">SketchStyle<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorStyle.html\">GeometryEditorStyle<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchVertex.html\">SketchVertex<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorVertex.html\">GeometryEditorVertex<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorMidVertex.html\">GeometryEditorMidVertex<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorGeometry.html\">GeometryEditorGeometry<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorPart.html\">GeometryEditorPart<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/v100\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.SketchResizeMode.html\">SketchResizeMode<\/a><\/td>\n<td width=\"50%\"><a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorScaleMode.html\">GeometryEditorScaleMode<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n"},{"acf_fc_layout":"content","content":"<h2><a id=\"flexible\"><\/a><strong><u>Improvements<\/u><\/strong><\/h2>\n"},{"acf_fc_layout":"content","content":"<p>Given the migration table above, you might ask why the <em>SketchCreationMode <\/em>enum has three items replacing it. The <em>GeometryEditor<\/em> (through the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.Tool.html\">Tool<\/a> property) enables vertex editing, freehand drawing, or transforming shapes with <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.VertexTool.html\">VertexTool<\/a>, <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.FreehandTool.html\">FreehandTool<\/a> or <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.ShapeTool.html\">ShapeTool<\/a>, respectively.<\/p>\n<p>Previously, predefined shapes were only available when creating a polygon geometry.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p style=\"text-align: center;\">By specifying <em>GeometryType<\/em> and <em>ShapeTool<\/em>, you can now<em><span style=\"text-decoration: underline;\"><strong> create line geometry using predefined shapes<\/strong><\/span><\/em>. Or <span style=\"text-decoration: underline;\"><em><strong>transform new\u00a0 shapes <\/strong><\/em><\/span>with geometry and <em>ShapeTool<\/em>.<strong>\u00a0<\/strong><\/p>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>Notice that while there is no circle type, the <em>ShapeTool\u2019s<\/em> <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.ShapeTool.Configuration.html#Esri_ArcGISRuntime_UI_Editing_ShapeTool_Configuration\">Configuration<\/a> property has a <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.InteractionConfiguration.ScaleMode.html#Esri_ArcGISRuntime_UI_Editing_InteractionConfiguration_ScaleMode\">ScaleMode<\/a> that, when set to <em>Uniform,<\/em> will create a circle:<\/p>\n"},{"acf_fc_layout":"content","content":"<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #2749f0;\">var<\/span> tool = <span style=\"color: #0f9e2f;\">ShapeTool<\/span>.<span style=\"color: #bd9424;\">Create<\/span>(<span style=\"color: #0f9e2f;\">ShapeToolType<\/span>.Ellipse);\r\ntool.Configuration.ScaleMode = <span style=\"color: #0f9e2f;\">GeometryEditorScaleMode<\/span>.Uniform;\r\n\r\n<\/pre>\n"},{"acf_fc_layout":"content","content":"<p>The animation below demonstrates interactively drawing geometries with the <em>GeometryEditor<\/em>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2050502,"id":2050502,"title":"Geometry Editor Drawing","filename":"geometry_editor_drawing.gif","filesize":2036692,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\/geometry_editor_drawing","alt":"Demonstrates interactively drawing geometries with the GeometryEditor.","author":"6351","description":"","caption":"","name":"geometry_editor_drawing","status":"inherit","uploaded_to":2048452,"date":"2023-08-11 20:31:28","modified":"2023-08-18 20:24:18","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1280,"height":720,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","medium_large-width":768,"medium_large-height":432,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","large-width":1280,"large-height":720,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","1536x1536-width":1280,"1536x1536-height":720,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","2048x2048-width":1280,"2048x2048-height":720,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing-826x465.gif","card_image-width":826,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_drawing.gif","wide_image-width":1280,"wide_image-height":720}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>With the <em>Tool<\/em> property, you can also configure allowable transformations for <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.InteractionConfiguration.html\">interaction<\/a> and customize the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorStyle.html\">style<\/a> of these tool handles without interrupting the edit session.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p style=\"text-align: center;\">Creation, deletion, selection, and transformation <em><span style=\"text-decoration: underline;\"><strong>options can be <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.InteractionConfiguration.html#methods\">set<\/a> once or fine-tuned to apply only on vertex, mid-vertex, geometry, or part elements.<\/strong><\/span><\/em><\/p>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>The selected element reports which interaction options are available through its <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorElement.html#properties\">properties<\/a>.<\/p>\n<p>The animation below demonstrates interactively editing geometries while customizing tool handles without interrupting the <em>GeometryEditor\u2019s<\/em> edit session.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2050462,"id":2050462,"title":"Geometry Editor Customization","filename":"geometry_editor_customization.gif","filesize":2393527,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\/geometry_editor_customization","alt":"Demonstrates interactively editing geometries while customizing tool handles without interrupting the GeometryEditor\u2019s edit session.","author":"6351","description":"","caption":"","name":"geometry_editor_customization","status":"inherit","uploaded_to":2048452,"date":"2023-08-11 20:16:39","modified":"2023-08-17 07:12:12","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1280,"height":720,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","medium_large-width":768,"medium_large-height":432,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","large-width":1280,"large-height":720,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","1536x1536-width":1280,"1536x1536-height":720,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","2048x2048-width":1280,"2048x2048-height":720,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization-826x465.gif","card_image-width":826,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_customization.gif","wide_image-width":1280,"wide_image-height":720}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<p>With the <em>GeometryEditor<\/em>, you can do more than update a single vertex programmatically. The select, delete, and move methods act on a <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.SelectedElement.html\">SelectedElement<\/a> property. This element can be the entire geometry, a vertex, a mid-vertex, or a single part in a multipart geometry.<\/p>\n"},{"acf_fc_layout":"sidebar","content":"<p style=\"text-align: center;\">The <em>GeometryEditor<\/em> supports <strong><em><u>multipart drawing and editing<\/u><\/em><\/strong> and makes <strong><em><u>rotate and scale methods available<\/u><\/em><\/strong>.<\/p>\n","image_reference":false,"layout":"standard","image_reference_figure":"","snippet":"","spotlight_name":"","section_title":"","position":"Center","spotlight_image":false},{"acf_fc_layout":"content","content":"<p>To add a new part, enable the <em>Tool\u2019s<\/em> part creation and clear all selection before the next interaction or call to insert vertex. For transformation to apply on all parts, select the entire geometry before the next interaction or call to rotate\/scale.<\/p>\n<p>The animation below demonstrates drawing and editing a multipart polygon with the <em>GeometryEditor<\/em>.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2055652,"id":2055652,"title":"Geometry Editor Multipart Editing","filename":"geometry_editor_multipart_editing.gif","filesize":1776587,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\/geometry_editor_multipart_editing","alt":"Demonstrates drawing and editing a multipart polygon with the GeometryEditor.","author":"6351","description":"","caption":"","name":"geometry_editor_multipart_editing","status":"inherit","uploaded_to":2048452,"date":"2023-08-17 20:14:48","modified":"2023-08-18 20:25:32","menu_order":0,"mime_type":"image\/gif","type":"image","subtype":"gif","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":1280,"height":720,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing-213x200.gif","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","medium-width":464,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","medium_large-width":768,"medium_large-height":432,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","large-width":1280,"large-height":720,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","1536x1536-width":1280,"1536x1536-height":720,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","2048x2048-width":1280,"2048x2048-height":720,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing-826x465.gif","card_image-width":826,"card_image-height":465,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_multipart_editing.gif","wide_image-width":1280,"wide_image-height":720}},"image_position":"center","orientation":"horizontal","hyperlink":""},{"acf_fc_layout":"content","content":"<h2><a id=\"dotnet\"><\/a><strong><u>.NET support<\/u><\/strong><\/h2>\n"},{"acf_fc_layout":"content","content":"<p>One noticeable difference .NET developers may find is the absence of <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.windows.input.icommand?view=net-7.0\">ICommand<\/a> properties and <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/standard\/asynchronous-programming-patterns\/task-based-asynchronous-pattern-tap\">task-based asynchronous<\/a> methods in the <em>GeometryEditor<\/em>. While data binding is supported with all <em>GeometryEditor<\/em> classes implementing <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.componentmodel.inotifypropertychanged?view=net-7.0\">INotifyPropertyChanged<\/a>, <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.windows.input.icommand?view=net-7.0\">ICommand<\/a> properties that update the state of controls is usually coupled with business logic. Therefore, commands are best implemented in your own <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/architecture\/maui\/mvvm#viewmodel\">ViewModel<\/a>.<\/p>\n<p>Some examples of data binding are:<\/p>\n<ul>\n<li>A one-way binding to the <em>GeometryEditor\u2019s<\/em> <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Location.StatusChangedEventArgs.IsStarted.html\">IsStarted<\/a> (formerly, <em>IsEnabled<\/em>) property can change the visibility of your controls.<\/li>\n<li>A two-way binding to a slider\u2019s value property can directly update the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditorStyle.Opacity.html\">Opacity<\/a> of the <em>GeometryEditor\u2019s<\/em> tool handles.<\/li>\n<\/ul>\n<p>Unlike these simple properties, commands tend to do more than update the <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/architecture\/maui\/mvvm#view\">View<\/a> and perform operations on the <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/architecture\/maui\/mvvm#model\">Model<\/a>. So, the <em>GeometryEditor<\/em> exposes methods and properties that will help you build commands instead. We realized that the presumptions we made in completing your draw or edit session in the <em>SketchEditor<\/em> should account for your application logic.<\/p>\n<table width=\"100%\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"100%\">\n<p style=\"text-align: center;\"><strong>Commands use Methods\/Properties<\/strong><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"30%\">AddCommand<\/td>\n<td width=\"70%\">InsertVertex(MapPoint) when IsStarted<\/td>\n<\/tr>\n<tr>\n<td width=\"30%\">DeleteCommand<\/td>\n<td width=\"70%\">DeleteSelectedElement() when SelectedElement exists<\/td>\n<\/tr>\n<tr>\n<td width=\"30%\">UndoCommand<\/td>\n<td width=\"70%\">Undo() when CanUndo<\/td>\n<\/tr>\n<tr>\n<td width=\"30%\">RedoCommand<\/td>\n<td width=\"70%\">Redo() when CanRedo<\/td>\n<\/tr>\n<tr>\n<td width=\"168\">CancelCommand<\/td>\n<td width=\"372\">Stop() when IsStarted<\/td>\n<\/tr>\n<tr>\n<td width=\"30%\">CompleteCommand<\/td>\n<td width=\"70%\">Stop() when IsStarted and Geometry passes validation<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Previously, the <em>StartAsyn<\/em>c() method with <em>drawAndEdit: false,<\/em> when awaited, provided a convenient way to return a completed geometry using the following gestures for these creation modes:<\/p>\n<ul>\n<li>point: tap<\/li>\n<li>polyline\/polygon: double tap<\/li>\n<li>freehand or shapes: pointer up or release<\/li>\n<\/ul>\n<p>However, with this logic baked into the <em>SketchEditor<\/em>, you were unable to define the gesture, key combination, or state that determines the readiness of the geometry. With more control, you could include logic to do things like validate more than just the minimum number of vertices for this geometry, add multiple parts to this geometry, or perhaps even tie this draw or edit with a <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Geometry.GeometryEngine.html\">GeometryEngine<\/a> method that cuts, reshapes, or auto completes with another geometry.<\/p>\n"},{"acf_fc_layout":"content","content":"<h3><em>Asynchronous start task with geometry result<\/em><\/h3>\n"},{"acf_fc_layout":"content","content":"<p>To create an asynchronous start task similar to what the <em>SketchEditor<\/em> provided, use a <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.threading.tasks.taskcompletionsource-1?view=net-7.0\">TaskCompletionSource&lt;Geometry&gt;<\/a> to set the geometry result and handle its cancellation or any exception.<\/p>\n<ul>\n<li>To set the geometry result:\n<ul style=\"padding-left: 30px;\">\n<li>Decide which events to use\n<ul style=\"padding-left: 60px;\">\n<li>Platform events such as keyboard, gesture, or speech<\/li>\n<li><em>GeoView<\/em> events like tapped, double tapped, or holding<\/li>\n<\/ul>\n<\/li>\n<li>Perform validations on the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.Geometry.html\">Geometry<\/a> property<\/li>\n<li>Call <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.Editing.GeometryEditor.Stop.html\">Stop()<\/a>, do any post processing on its return value, and set the result<\/li>\n<\/ul>\n<\/li>\n<li>To handle cancellation or an exception:\n<ul style=\"padding-left: 30px;\">\n<li>Set canceled when <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Location.StatusChangedEventArgs.IsStarted.html\">IsStarted<\/a> becomes false<\/li>\n<li>Set exception to propagate any error that occurs<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>The code example below assumes your <em>ViewModel<\/em> has created a <em>GeometryEditor<\/em> instance used by your <em>MapView<\/em>. For brevity of this snippet, I\u2019m using the <em>GeometryEditor\u2019s<\/em> <em>PropertyChanged<\/em> event. You can use the appropriate geometry builder\u2019s <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Geometry.GeometryBuilder-1.IsSketchValid.html#Esri_ArcGISRuntime_Geometry_GeometryBuilder_1_IsSketchValid\">IsSketchValid<\/a> or be more creative about validating the geometry. The code awaiting the result of this start method should then be prepared to handle <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/api\/system.threading.tasks.taskcanceledexception?view=net-7.0\">TaskCanceledException<\/a>.<\/p>\n"},{"acf_fc_layout":"content","content":"<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #0000ff;\">public<\/span> <span style=\"color: #0f9e2f;\">Task&lt;Geometry&gt; <\/span>StartAsync(<span style=\"color: #0f9e2f;\">GeometryType<\/span> geometryType)\r\n{\r\n    <span style=\"color: #2b91af;\">var<\/span> tcs = <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #0f9e2f;\">TaskCompletionSource&lt;Geometry&gt;<\/span>();\r\n\r\n    <span style=\"color: #0f9e2f;\">PropertyChangedEventHandler<\/span>? onPropertyChanged = <span style=\"color: #0000ff;\">null<\/span>;\r\n    onPropertyChanged = (s, e) =&gt;\r\n    {\r\n        <span style=\"color: #0000ff;\">if<\/span> (e.PropertyName == <span style=\"color: #0000ff;\">nameof<\/span>(GeometryEditor.Geometry) &amp;&amp; \r\n<span style=\"color: #bd9424; padding-left: 135px;\">IsSketchValid<\/span>() &amp;&amp; _geometryEditor.<span style=\"color: #bd9424;\">Stop<\/span>() <span style=\"color: #0000ff;\">is<\/span> <span style=\"color: #0f9e2f;\">Geometry<\/span> geometry)\r\n        {\r\n            _geometryEditor.PropertyChanged -= onPropertyChanged;\r\n            tcs.<span style=\"color: #bd9424;\">TrySetResult<\/span>(geometry);\r\n        }\r\n        <span style=\"color: #0000ff;\">else if<\/span> (e.PropertyName == <span style=\"color: #0000ff;\">nameof<\/span>(GeometryEditor.IsStarted) &amp;&amp;\r\n<span style=\"padding-left: 185px;\">!_geometryEditor.IsStarted<\/span>)\r\n        {\r\n            _geometryEditor.PropertyChanged -= onPropertyChanged;\r\n            tcs.<span style=\"color: #bd9424;\">TrySetCanceled<\/span>();\r\n        }\r\n    };\r\n    _geometryEditor.PropertyChanged += onPropertyChanged;\r\n\r\n    <span style=\"color: #0000ff;\">try<\/span>\r\n    {\r\n        _geometryEditor.<span style=\"color: #bd9424;\">Start<\/span>(geometryType);\r\n    }\r\n    <span style=\"color: #0000ff;\">catch<\/span> (<span style=\"color: #0f9e2f;\">Exception<\/span> ex)\r\n    {\r\n        tcs.<span style=\"color: #bd9424;\">TrySetException<\/span>(ex);\r\n    }\r\n    <span style=\"color: #0000ff;\">return<\/span> tcs.Task;\r\n}\r\n<\/pre>\n"},{"acf_fc_layout":"content","content":"<p>You can also call <em>Stop(<\/em><em>)<\/em> when the ENTER or ESC keys are pressed or when certain conditions in your app are satisfied. You could enforce certain feature attribute values with the geometry change, snap updated geometry with another feature, or ensure that the edit abides by specific rules. For example, an update to a utility network feature should be backed by <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UtilityNetworks.UtilityNetworkDefinition.GetRulesAsync.html\">network rules<\/a>.<\/p>\n"},{"acf_fc_layout":"content","content":"<h3><em>ICommand properties<\/em><\/h3>\n"},{"acf_fc_layout":"content","content":"<p>To create <em>ICommand<\/em> properties, it is important to know the following:<\/p>\n<ul>\n<li>what it needs to do (action),<\/li>\n<li>when it can do it (predicate), and<\/li>\n<li>when its ability to do it changes (raise predicate changed).<\/li>\n<\/ul>\n<p>You can use the <em>GeometryEditor<\/em> methods and subscribe to a <em>PropertyChanged<\/em> event to be notified when a method can execute. Using .NET Community Toolkit\u2019s <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/communitytoolkit\/mvvm\/generators\/relaycommand\">RelayCommand<\/a>, an undo command can be implemented this way:<\/p>\n"},{"acf_fc_layout":"content","content":"<pre style=\"margin: 0; line-height: 125%;\"><span style=\"color: #0000ff;\">private<\/span> <span style=\"color: #0f9e2f;\">IRelayCommand<\/span>? _undoCommand;\r\n<span style=\"color: #0000ff;\">public<\/span> <span style=\"color: #0f9e2f;\">IRelayCommand<\/span> UndoCommand =&gt; _undoCommand ??=\r\n    <span style=\"color: #0000ff;\">new<\/span> <span style=\"color: #0f9e2f;\">RelayCommand<\/span>(() =&gt; _geometryEditor.<span style=\"color: #bd9424;\">Undo<\/span>(),\r\n<span style=\"padding-left: 230px;\">() =&gt; _geometryEditor.CanUndo);<\/span>\r\n\r\n<span style=\"color: #0000ff;\">private<\/span> <span style=\"color: #0000ff;\">void<\/span> OnPropertyChanged(<span style=\"color: #2b91af;\">object?<\/span> sender, <span style=\"color: #0f9e2f;\">PropertyChangedEventArgs<\/span> e)\r\n{\r\n    <span style=\"color: #0000ff;\">if<\/span> (e.PropertyName == <span style=\"color: #0000ff;\">nameof<\/span>(GeometryEditor.CanUndo))\r\n        UndoCommand.<span style=\"color: #bd9424;\">NotifyCanExecuteChanged<\/span>();\r\n}\r\n<\/pre>\n"},{"acf_fc_layout":"content","content":"<h2><strong>Conclusion<\/strong><\/h2>\n"},{"acf_fc_layout":"content","content":"<p>I hope this article has helped illustrate how the <em>GeometryEditor<\/em> now supersedes the legacy <em>SketchEditor<\/em> in capabilities. With:<\/p>\n<ul>\n<li>Better shape support, you can transform new shapes and create predefined shapes as line geometries.<\/li>\n<li>Enhanced configuration, you can refine allowable transformations to a specific geometry editor element.<\/li>\n<li>Complete multipart support, you can create, update, move, rotate, or scale individual parts.<\/li>\n<li>Improved programmatic support, you can now call rotate or scale; and have delete and move methods act on selected element.<\/li>\n<\/ul>\n<p>By providing your applications greater flexibility, you can tailor the <em>GeometryEditor<\/em> to satisfy existing <em>SketchEditor<\/em> workflows. With more fine-grained control, you can incorporate your business requirements. For .NET developers migrating to <em>GeometryEditor<\/em> from <em>SketchEditor<\/em>, while data binding comes for free, <em>ICommand<\/em> and asynchronous tasks need to move to your <em>ViewModel<\/em> using equivalent <em>GeometryEditor<\/em> methods and properties.<\/p>\n<p>I invite you to try out the new <a href=\"https:\/\/developers.arcgis.com\/net\/wpf\/sample-code\/create-and-edit-geometries\/\">Create and edit geometries sample<\/a> available in all platforms in the Native SDKs GitHub repos to see the <em>GeometryEditor<\/em> in action. You can also read more about <a href=\"https:\/\/developers.arcgis.com\/kotlin\/query-and-edit\/edit\/#capturing-geometry-edits\">capturing geometry edits<\/a>\u00a0 for <a href=\"https:\/\/developers.arcgis.com\/net\/query-and-edit\/\">query and edit\u00a0<\/a> or <a href=\"https:\/\/developers.arcgis.com\/net\/spatial-and-data-analysis\/\">spatial and data analysis<\/a>.<\/p>\n<p>In the future, you can expect enhancements like snapping, rule-based editing, curve support, and more in the <em>GeometryEditor<\/em>. The <em>SketchEditor<\/em> and related classes will be removed in the next major release. I therefore encourage you to migrate your code as soon as possible.<\/p>\n<p>I look forward to hearing how you have enhanced your application with the <em>GeometryEditor<\/em>. Please send your feedback through the <a href=\"https:\/\/community.esri.com\/t5\/arcgis-maps-sdks-for-native-apps\/ct-p\/arcgis-runtime-sdks\">ArcGIS Maps SDKs for Native Apps Esri Community<\/a>.<\/p>\n"}],"related_articles":[{"ID":66731,"post_author":"6351","post_date":"2015-03-16 10:50:11","post_date_gmt":"2015-03-16 10:50:11","post_content":"","post_title":"Measuring distances and area with ArcGIS Runtime SDK for .NET","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"measuring-distances-and-area-with-arcgis-runtime-sdk-for-net","to_ping":"","pinged":"","post_modified":"2023-08-23 11:53:03","post_modified_gmt":"2023-08-23 18:53:03","post_content_filtered":"","post_parent":0,"guid":"http:\/\/www.esri.com\/arcgis-blog\/products\/product\/uncategorized\/measuring-distances-and-area-with-arcgis-runtime-sdk-for-net\/","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_card.jpg","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_banner.jpg"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Migrating your legacy .NET SketchEditor code to the new GeometryEditor Use the new Geometry Editor<\/title>\n<meta name=\"description\" content=\"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Migrating your legacy .NET SketchEditor code to the new GeometryEditor\" \/>\n<meta property=\"og:description\" content=\"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T08:15:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\"},\"author\":{\"name\":\"Jennifer Nery\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a3b7b2d1ed972b03f0e342613bc2b690\"},\"headline\":\"Migrating your legacy .NET SketchEditor code to the new GeometryEditor\",\"datePublished\":\"2023-08-23T15:00:57+00:00\",\"dateModified\":\"2024-04-12T08:15:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\"},\"wordCount\":10,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"draw\",\"edit\",\"geometry\",\"sketch\"],\"articleSection\":[\"Developers\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\",\"name\":\"Migrating your legacy .NET SketchEditor code to the new GeometryEditor Use the new Geometry Editor\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2023-08-23T15:00:57+00:00\",\"dateModified\":\"2024-04-12T08:15:46+00:00\",\"description\":\"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Migrating your legacy .NET SketchEditor code to the new GeometryEditor\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a3b7b2d1ed972b03f0e342613bc2b690\",\"name\":\"Jennifer Nery\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/01\/Profile2-465x465.jpeg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/01\/Profile2-465x465.jpeg\",\"caption\":\"Jennifer Nery\"},\"description\":\"Jennifer Nery is a Principal Software Development Engineer for the ArcGIS Maps SDK for .NET with over 15 years of experience in designing and developing APIs, toolkits, samples, and applications for desktop and mobile. Jennifer actively participates in the full development of utility networks, enhancement of feature layers, expanding support for branch versioning and session management, and is passionate about seeing these awesome features come to life for developers in ArcGIS Maps SDK for Native Apps!\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/jenniferdnery\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor Use the new Geometry Editor","description":"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","og_locale":"en_US","og_type":"article","og_title":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor","og_description":"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2024-04-12T08:15:46+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor"},"author":{"name":"Jennifer Nery","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a3b7b2d1ed972b03f0e342613bc2b690"},"headline":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor","datePublished":"2023-08-23T15:00:57+00:00","dateModified":"2024-04-12T08:15:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor"},"wordCount":10,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["draw","edit","geometry","sketch"],"articleSection":["Developers"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor","name":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor Use the new Geometry Editor","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2023-08-23T15:00:57+00:00","dateModified":"2024-04-12T08:15:46+00:00","description":"Leverage the rich capabilities of the new GeometryEditor by migrating your SketchEditor code","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/migrating-your-legacy-sketcheditor-code-to-the-new-geometryeditor#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Migrating your legacy .NET SketchEditor code to the new GeometryEditor"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/a3b7b2d1ed972b03f0e342613bc2b690","name":"Jennifer Nery","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/01\/Profile2-465x465.jpeg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/01\/Profile2-465x465.jpeg","caption":"Jennifer Nery"},"description":"Jennifer Nery is a Principal Software Development Engineer for the ArcGIS Maps SDK for .NET with over 15 years of experience in designing and developing APIs, toolkits, samples, and applications for desktop and mobile. Jennifer actively participates in the full development of utility networks, enhancement of feature layers, expanding support for branch versioning and session management, and is passionate about seeing these awesome features come to life for developers in ArcGIS Maps SDK for Native Apps!","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/jenniferdnery"}]}},"text_date":"August 23, 2023","author_name":"Jennifer Nery","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/jenniferdnery","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2023\/08\/geometry_editor_banner.jpg","primary_product":"ArcGIS Maps SDK for .NET","tag_data":[{"term_id":771422,"name":"draw","slug":"draw","term_group":0,"term_taxonomy_id":771422,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":377652,"name":"edit","slug":"edit","term_group":0,"term_taxonomy_id":377652,"taxonomy":"post_tag","description":"","parent":0,"count":10,"filter":"raw"},{"term_id":28391,"name":"geometry","slug":"geometry","term_group":0,"term_taxonomy_id":28391,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw"},{"term_id":759822,"name":"sketch","slug":"sketch","term_group":0,"term_taxonomy_id":759822,"taxonomy":"post_tag","description":"","parent":0,"count":13,"filter":"raw"}],"category_data":[{"term_id":738191,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":738191,"taxonomy":"category","description":"","parent":0,"count":422,"filter":"raw"}],"product_data":[{"term_id":761642,"name":"ArcGIS Location Platform","slug":"platform","term_group":0,"term_taxonomy_id":761642,"taxonomy":"product","description":"","parent":36601,"count":214,"filter":"raw"},{"term_id":769142,"name":"ArcGIS Maps SDK for .NET","slug":"sdk-net","term_group":0,"term_taxonomy_id":769142,"taxonomy":"product","description":"","parent":36601,"count":39,"filter":"raw"},{"term_id":769162,"name":"ArcGIS Maps SDK for Java","slug":"sdk-java","term_group":0,"term_taxonomy_id":769162,"taxonomy":"product","description":"","parent":36601,"count":24,"filter":"raw"},{"term_id":768902,"name":"ArcGIS Maps SDK for Kotlin","slug":"sdk-kotlin","term_group":0,"term_taxonomy_id":768902,"taxonomy":"product","description":"","parent":36601,"count":33,"filter":"raw"},{"term_id":769152,"name":"ArcGIS Maps SDK for Qt","slug":"sdk-qt","term_group":0,"term_taxonomy_id":769152,"taxonomy":"product","description":"","parent":36601,"count":36,"filter":"raw"},{"term_id":768912,"name":"ArcGIS Maps SDK for Swift","slug":"sdk-swift","term_group":0,"term_taxonomy_id":768912,"taxonomy":"product","description":"","parent":36601,"count":32,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=sdk-net","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2048452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/6351"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2048452"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2048452\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2048452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2048452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2048452"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2048452"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2048452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}