private void ConvexButton_Click(object sender, RoutedEventArgs e)
{
ConvexButton.IsEnabled = false;
outputGraphicsLayer.ClearGraphics();
GeometryService geometryService =
new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
geometryService.ConvexHullCompleted += GeometryService_ConvexHullCompleted;
geometryService.Failed += GeometryService_Failed;
List<Graphic> graphicsList = new List<Graphic>();
foreach (Graphic g in inputGraphicsLayer.Graphics)
{
graphicsList.Add(g);
}
geometryService.ConvexHullAsync(graphicsList);
}