Hello Jennifer,The code you posted doesn't seem to do anything (at least it doesn't in the way I implemented it): Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
Dim theKmlLayer As ESRI.ArcGIS.Client.Toolkit.DataSources.KmlLayer = CType(Map1.Layers("MyGraphicsLayer"), KmlLayer)
Dim fillsymbolcolor As New SimpleFillSymbol
fillsymbolcolor.Fill = New SolidColorBrush(Color.FromRgb(255, 0, 0))
For Each kl As GraphicsLayer In theKmlLayer
For Each g As Graphic In kl.Graphics
If CStr(g.Attributes("name")) = "United States" Then
g.Symbol = fillsymbolcolor
End If
Next
Next
Dim l = TryCast(Map1.Layers("MyGraphicsLayer"), KmlLayer)
Dim f = l.Graphics.FirstOrDefault
Dim s = TryCast(f.Symbol, SimpleFillSymbol)
s.Fill.Opacity = 0.3
End Sub
and my xmal:<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
<Grid>
<esri:Map Background="White" Name="Map1" WrapAround="True">
<esri:Map.Layers>
<esri:LayerCollection>
<esri:ArcGISTiledMapServiceLayer Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
<esri:KmlLayer ID="MyGraphicsLayer" Url="C:\junk\SiteMap5.Kml" VisibleLayers="Polygons"/>
</esri:LayerCollection>
</esri:Map.Layers>
</esri:Map>
<Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="12,145,0,0" Name="Button1" VerticalAlignment="Top" Width="75" />
</Grid>
</Window>
The shapes still have a solid white or red fill (depending on if the shapename is "United States" or not). Do all imported kml files have a default fill of white?Any other thoughts or feedback is greatly appreciated.Thanks!