Hi to all,
i would like to set renderer on feature layer (poligons in this case) through behind code:
I have write this code ... doesn't work:
SimpleRenderer sr = new SimpleRenderer();
SimpleFillSymbol fillSymbol = new SimpleFillSymbol()
{
BorderBrush = new SolidColorBrush(Color.FromArgb(0, 255,255,255)),
BorderThickness = 2,
Fill = new SolidColorBrush(Color.FromArgb(0, 255,255,255))
};
sr.Symbol = fillSymbol;
my_feature_layer.Renderer = sr;
instead if i use the xaml code for my_feature_layer this work fine
<Grid.Resources>
<esri:SimpleRenderer x:Key="sr">
<esri:SimpleRenderer.Symbol>
<symbols:SimpleFillSymbol BorderBrush="Blue" Fill="#330000FF" />
</esri:SimpleRenderer.Symbol>
</esri:SimpleRenderer>
</Grid.Resources>
Which is the difference ? it's necesary to have renderer defined inside grid resouces first ?
Thank's everyone help me.
Bye GP