private Graphic CreateSelectionGraphic(Feature feature)
{
if (feature == null)
return null;
var selectionGraphic = feature is GeodatabaseFeature ? ((GeodatabaseFeature)feature).AsGraphic() : new Graphic { Geometry = feature.Geometry };
switch (selectionGraphic.Geometry.GeometryType)
{
case GeometryType.Multipoint:
case GeometryType.Point:
selectionGraphic.Symbol = _pointSelectionSymbol;
break;
case GeometryType.Polygon:
case GeometryType.Envelope:
selectionGraphic.Symbol = _polygonSelectionSymbol;
break;
case GeometryType.Polyline:
selectionGraphic.Symbol = _polylineSelectionSymbol;
break;
}
return selectionGraphic;
}
}