I noticed today that some of our selection code (written using the 10.2.3 beta) was no longer working as expected for features on some of our layers. The issue occurred only on feature layers with transparent symbology defined when performing a hit test. This seemed strange, as it was working previously, so I headed over to look at the API, and found the below:
"When performing a hittest on a FeatureLayer with polygon based features, make sure that a non-transparent FillSymbol style is applied to the Renderer of the FeatureLayer. If no FillSymbol is applied, meaning the polygon fill is considered transparent (even though there may me a polygon outline symbol applied), the hittest will not return an RowID values."
Ah. This sounds like the problem. This was not the case in any of the beta releases of the runtime. Is there no way of performing a hit test on a transparent feature anymore (despite it having a solid border)?
I presume I must be missing something obvious?
Unfortunately this is a limitation in the 10.2.4 release which we intend to address for the next release. The suggested workaround is to set the polygon fill style to “null” and the symbol color to something non-transparent.
In addition to Mike's response, you may also use QueryAsync providing geometry in the SpatialFilter if working with ArcGISFeatureTable/ServiceFeatureTable or GeometryEngine.Intersects method.