void MyMap_KeyDown(object sender, KeyEventArgs e) { if (e.Key == Key.Delete) { var l = MyMap.Layers["Drawing Layer"] as GraphicsLayer; if (l != null) { var graphic = l.Graphics.LastOrDefault(g => g.Geometry != null); if (graphic != null) l.Graphics.Remove(graphic); //check if this returns true/false. } } }
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.