ESRI.ArcGIS.Client.Symbols.SimpleFillSymbol ImportFillSymbol = new ESRI.ArcGIS.Client.Symbols.SimpleFillSymbol(); ImportFillSymbol.Fill = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 128, 0, 255)); ImportFillSymbol.BorderBrush = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(255, 79, 0, 157)); ImportFillSymbol.BorderThickness = 1;
SimpleFillSymbol ImportFillSymbol = AlreadyDefinedFillSymbol.Red
Solved! Go to Solution.
Private Sub GraphicsLayer_MouseEnter(sender As System.Object, e As ESRI.ArcGIS.Client.GraphicMouseEventArgs) Dim gr As New Graphic gr = e.Graphic Dim sy As New SimpleFillSymbol sy.Fill = New Media.SolidColorBrush(Media.Color.FromArgb(128, 254, 0, 0)) gr.Symbol = sy End Sub
<esri:FillSymbol x:Key="SelectFillSymbol"> <esri:FillSymbol.ControlTemplate> <ControlTemplate> <Path x:Name="Element" Stroke="Black" StrokeStartLineCap="Round" StrokeThickness="2" StrokeLineJoin="Round" StrokeEndLineCap="Round" Fill="Blue"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="SelectionStates"> <VisualState x:Name="Unselected" > <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" To="Blue" Duration="00:00:00.25"/> </Storyboard> </VisualState> <VisualState x:Name="Selected"> <Storyboard> <ColorAnimation Storyboard.TargetName="Element" Storyboard.TargetProperty="(Path.Fill).(SolidColorBrush.Color)" To="Cyan" Duration="00:00:00.25"/> <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashArray"> <DiscreteObjectKeyFrame KeyTime="0:0:0"> <DiscreteObjectKeyFrame.Value> <DoubleCollection>2,1</DoubleCollection> </DiscreteObjectKeyFrame.Value> </DiscreteObjectKeyFrame> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Path> </ControlTemplate> </esri:FillSymbol.ControlTemplate> </esri:FillSymbol>
Private Sub GraphicsLayer_MouseEnter(sender As System.Object, e As ESRI.ArcGIS.Client.GraphicMouseEventArgs) Dim gr As New Graphic gr = e.Graphic Dim sy As New SimpleFillSymbol sy.Fill = New Media.SolidColorBrush(Media.Color.FromArgb(128, 254, 0, 0)) gr.Symbol = sy End Sub