Select to view content in your preferred language

Change Line Width on MouseOver

1022
4
12-06-2011 11:40 PM
oo
by
Emerging Contributor
I would like to change the line width of a LineSymbol on MouseOver. I followed the SimpleRenderer used in the FeatureLayer Rendering Sample but I don't understand how I can keep the original line color and not over writting it in "<Path x:Name="Element" Stroke="Blue" StrokeThickness="1" />". The FeatureLayer I am working with contains lines of diffrent colors.

Thanks for your help.


By the way: How is the rollover effect of the SimpleFillSymbol in the ClassBreaksRendere of the same sample caused?
0 Kudos
4 Replies
DominiqueBroux
Esri Frequent Contributor
Most generally this kind of effect needs custom symbols.

In the sample you pointed out, we get this effect by changing the line width when the mouse is over:

....
           <VisualState x:Name="MouseOver">
            <Storyboard>
             <DoubleAnimation BeginTime="0" Storyboard.TargetName="Element" Storyboard.TargetProperty="(Shape.StrokeThickness)" To="3" Duration="00:00:01" />
            </Storyboard>
           </VisualState>
...



You will find lot of custom symbols samples in the symbol gallery : http://help.arcgis.com/en/webapi/silverlight/samples/SymbolGalleryWeb/start.htm
0 Kudos
oo
by
Emerging Contributor
Yes, but how can I keep the line's original color (defined in the .mxd) and just change the width of the line?
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Yes, but how can I keep the line's original color (defined in the .mxd) and just change the width of the line?

OK. I got the problem:), unfortunately I don't see any easy solution 😞
You have to redefine all the original symbols.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I eventually wrote a sample allowing to keep the symbols defined in the mxd and to extend them automatically with mouse over effects.
Let me know your thoughts about that sample.
0 Kudos