Select to view content in your preferred language

Graphics layer - Change color on graphic mouse over

1232
3
04-12-2011 01:26 PM
BrentStevener
Deactivated User
I have a graphics layer of features that I draw, with associated symbols. How can I change the color of each graphic on the graphics layer when you mouse over it? I am adding these manually in code-behind applying a symbol to each feature from a featureclass I created from a JSON string. Is there some way to attach a mouse over method at the time I create the graphic? Some other way?
0 Kudos
3 Replies
BrentStevener
Deactivated User
Been a long day. All I needed was to use Addhandler to the graphic I was creating, for the MouseEnter event. *sigh* Issue resolved.
0 Kudos
dotMorten_esri
Esri Notable Contributor
You should be using SymbolStates for this instead of changing the Symbol back and forth.
Some of the symbols in this sample has various mouseover behaviors defined:
http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#CustomSymbols
0 Kudos
BrentStevener
Deactivated User
That's what I ended up doing after I was having problems with the events not firing correctly, and that is working fine.
0 Kudos