How do I create an event for graphical objects, e.g. Simple Marker Symbols or Poly Lines?
The purpose is to mark them and move them.
This method does not work for me, please see error message in the last 5 rows:
Esri.ArcGISRuntime.UI.Graphic aGraphic = new Esri.ArcGISRuntime.UI.Graphic();
aGraphic.MouseRightButtonDown += Graphic_MouseRightButtonDown;
void Graphic_MouseRightButtonDown(objectsender, System.Windows.Input.MouseButtonEventArgs e)
// Do something
Severity Code Description Project File Line Suppression State
Error CS1061 'Graphic' does not contain a definition for'MouseRightButtonDown' and no accessible extension method 'MouseRightButtonDown'accepting a first argument of type 'Graphic' could be found(are you missing a usingdirective or an assembly reference ?) AccessOptimizer C:\Users\matti\Desktop\ArcGISApp\ArcGISApp\MapWindow.xaml.cs 219 Active
The errors you have are not ArcGIS errors.. they are indicative of missing handlers that are expected per your code.
What you are trying to do may be achieved with sample code here - https://developers.arcgis.com/net/latest/uwp/api-reference/html/T_Esri_ArcGISRuntime_Geometry_Polyline.htm