Hello Team,I have few "Graphics Layers" in my map control.When "Graphics" is selected from 1st Graphics Layer it should be highlighted in "Red" color.When "Graphics" is selected from 2nd Graphics Layer it should be highlighted in "Blue" color.When "Graphics" is selected from 3rd Graphics Layer it should be highlighted in "Green" color.How can I achieve this using the "ControlTemplate" inside "SimpleRenderer" in the XAML file ?Should I have to declare one "SimpleRenderer" for each Graphics Layer ? Please advise.Can I change the "Selection Color" somehow in the code behind .cs file ? Any help is appreciated.Thank you for your time.ThanksAdam
<ControlTemplate> <Ellipse x:Name="ellipse" Fill="{Binding Symbol.Color}" Width="{Binding Symbol.Size}" Height="{Binding Symbol.Size}" Stroke="Black" StrokeThickness="1" > <Ellipse.Resources> <Storyboard x:Key="SelectionAnimation"> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ellipse" Storyboard.TargetProperty="Fill"> <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Red" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </Ellipse.Resources> <vsm:VisualStateManager.VisualStateGroups> <vsm:VisualStateGroup x:Name="SelectionStates"> <vsm:VisualState x:Name="Unselected" /> <vsm:VisualState x:Name="Selected" Storyboard="{StaticResource SelectionAnimation}" /> </vsm:VisualStateGroup> </vsm:VisualStateManager.VisualStateGroups> </Ellipse> </ControlTemplate>
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.