Select to view content in your preferred language

MouseButtonEventHandler

989
4
09-17-2013 06:39 AM
EricTraya
Emerging Contributor
I am converting an old ArcGIS 9.3 website to an ArcGIS 10.1. My development environment is C# on VS.Net 2012, with Infragistics 13 and Silverlight 5.  The old environment is C#on VS.Net 2010 Infragistics 10, and Silverlight 4. So I started cleaning up and upgrading references.  I finish the Infragistics part of it, but is stuck on a few ESRI and Windows specific classes.  One good example is the line of code below.

_graphicsLayer.MouseLeftButtonDown += new GraphicsLayer. MouseButtonEventHandler(GraphicsLayer_MouseLeftButtonDown);


MouseButtonEventHandler is expecting 2 arguments but the original code only passes one.  I try ignoring the syntax but VS.Net just wouldn't let it go.  I tried passing the first parameter but I can't figure out which object it should be referencing.  Can anyone help me?  Thanks.
0 Kudos
4 Replies
LanceCrumbliss
Frequent Contributor
0 Kudos
EricTraya
Emerging Contributor
I've read that article, yet is still doesn't explain to me why this line of code is not working anymore when it used to work perfect in our old development environment.  It's not as if I changed the code.  Its exactly the same code.



Take a look here:

http://resources.arcgis.com/en/help/silverlight-api/apiref/api_start.htm?ESRI.ArcGIS.Client~ESRI.Arc...

0 Kudos
LanceCrumbliss
Frequent Contributor
the reason I liked to the signature is because I believe it changed a few versions ago, one of which you may be converting from as part of your conversion project.

if you updated from an API version that had the old signature, it makes sense that VS would complain about the old code.

of course, if you were already using a version of the ESRI Silverlight API that uses the signature linked to, then this response doesn't apply 🙂
0 Kudos
EricTraya
Emerging Contributor
If that is the case, how do you thjink should I continue on this convertion?  Should I start creating the overloaded function that VS is looking for , or should I pass the parameter it's looking for?
0 Kudos