Hey UniqueValueRenderer works fine for me but I have another problem with uniqueValueInfo.ValueMy value is like this eg.. 12-12, 12-11, 56-60 etc..I get this from two different attribute value graphic.Attributes["ROW_LEFT"].ToString() and graphic.Attributes["ROW_RIGHT"].ToString() which I join later <esri:UniqueValueRenderer x:Name="uniqueValueRenderer">
</esri:UniqueValueRenderer>
uniqueValueRenderer.Attribute = "ROW_RIGHT";
string strValueassg = "";
UniqueValueInfo uniqueValueInfo = new UniqueValueInfo();
foreach (Graphic graphic in e.FeatureSet.Features)
{
string strUniqueLabel = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString();
graphicsLayer.Graphics.Add(graphic);
Random random = new Random();
SimpleLineSymbol symbol = new SimpleLineSymbol();
if (strUniqueLabel != "" && strUniqueLabel != strValueassg)
{
symbol.Color = new SolidColorBrush(Color.FromArgb(255, (byte)random.Next(0, 255), (byte)random.Next(0, 255), (byte)random.Next(0, 255)));
symbol.Width = 3;
}
uniqueValueInfo.Symbol = symbol;
uniqueValueInfo.Value = graphic.Attributes["ROW_RIGHT"];
uniqueValueInfo.Label = strUniqueLabel;
strValueassg = graphic.Attributes["ROW_LEFT"].ToString() + "-" + graphic.Attributes["ROW_RIGHT"].ToString();
}
uniqueValueRenderer.Infos.Add(uniqueValueInfo);
graphicsLayer.Renderer = uniqueValueRenderer;
the color appears in the Legend but not on the map ..I want to know if I can set any other value for uniqueValueRenderer.Attribute and uniqueValueInfo.Value