Select to view content in your preferred language

Questions about selection symbols

545
1
04-13-2011 02:59 PM
DonFreeman
Emerging Contributor
The esri sample at http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#SelectGraphics
shows us how to change the marker symbol color upon selection.
    <Ellipse x:Name="Element" Width="8" Height="8" StrokeThickness="1" Fill="#6363FF"  Stroke="Black">
          <VisualStateManager.VisualStateGroups>
           <VisualStateGroup x:Name="SelectionStates">
            <VisualState x:Name="Unselected" />
            <VisualState x:Name="Selected">
             <Storyboard>
              <ColorAnimation Storyboard.TargetName="Element" 
               Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"
               To="Yellow" 
               Duration="00:00:0.25"/>
                                                </Storyboard>                                                    
            </VisualState>
           </VisualStateGroup>
          </VisualStateManager.VisualStateGroups>
     </Ellipse>

My question is what if we also wanted to change its size also? How would that be worked into the storyboard? Also could the above sample be done with a simplemarkersymbol circle rather than an ellipse?
Thanks
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor

My question is what if we also wanted to change its size also?

You can add a scaletransform to the ellipse and change the sclaeX and/or scaleY in the visualstatemanager.
0 Kudos