I have a GraphicsOverlay with n graphics and I want to find out a number of them with some attributes. Now I have the following code:
for (int i = 0; i < _graphicsOverlay.Graphics.Count(); i++)
{
int _index = Convert.ToInt32(_graphicsOverlay.Graphics[i].Attributes["ORDER"].ToString());
int _range = Convert.ToInt32(_graphicsOverlay.Graphics[i].Attributes["RANGE"].ToString());
string _type = _graphicsOverlay.Graphics[i].Attributes["TYPE"].ToString();
if (_index == mapUnits.Order && _range == range && _type== "RING")
{
_graphicsOverlay.Graphics.Remove(_graphicsOverlay.Graphics[i]);
return false;
}
}
So, my question is, Is there a better way to get a graphics group that meet certain criteria for certain attributes of the graph?
Thanks in advance.