ArcGISWindowsPhoneSDK.Relation.GeometryService_RelationCompleted C# (CSharp) Method

GeometryService_RelationCompleted() private method

private GeometryService_RelationCompleted ( object sender, RelationEventArgs args ) : void
sender object
args RelationEventArgs
return void
        private void GeometryService_RelationCompleted(object sender, RelationEventArgs args)
        {
            List<GeometryRelationPair> results = args.Results;
            foreach (GeometryRelationPair pair in results)
            {
                if (pointLayer.Graphics[pair.Graphic1Index].Attributes["Relation"] == null)
                {
                    pointLayer.Graphics[pair.Graphic1Index].Attributes["Relation"] =
                    string.Format("Within Polygon {0}", pair.Graphic2Index);
                }
                else
                {
                    pointLayer.Graphics[pair.Graphic1Index].Attributes["Relation"] +=
                    "," + pair.Graphic2Index.ToString();
                }

                if (polygonLayer.Graphics[pair.Graphic2Index].Attributes["Relation"] == null)
                {
                    polygonLayer.Graphics[pair.Graphic2Index].Attributes["Relation"] =
                    string.Format("Contains Point {0}", pair.Graphic1Index);
                }
                else
                {
                    polygonLayer.Graphics[pair.Graphic2Index].Attributes["Relation"] +=
                    "," + pair.Graphic1Index.ToString();
                }
            }

            ExecuteRelationButton.Visibility = Visibility.Visible;
        }