Create event in C# from ArcGis Poly-lines

264
0
09-04-2020 02:32 AM
AndréGrce
New Contributor

How to connect Events in C# to graphical objects e.g. Simple Marker Symbol or Poly Line?

The main purpose is to move such objects I made myself. 

The following code I found does not work, please see error message in las 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

0 Kudos
0 Replies