I am following this tutorial http://www.arcgis.com/home/item.html?id=953a530ada30477d95cc69e788268bc9 but I don't know how to modify it to do what I need. I'd like to be able to access the data table within the shapefile, query it, and only map the returned results. This seems simple enough but I cannot find any documentation on how to do this. Any ideas?
Using the ArcGIS Runtime for .NET, you would want to use the ShapefileTable class to open your shapefile. Depending on how you need to query, you could potentially set the DefinitionExpression for the layer the ShapefileTable is associated with or you could use ShapefileTable.QueryAsync to retrieve the features back and then use those features to create a graphics layer for display purposes.
// Open shapefile
ShapefileTable shp = await ShapefileTable.OpenAsync(pathToShapefile);
// Create feature layer
FeatureTable ft = new FeatureTable(shp);
ft.DefenitionExpression = "sweet_field > 10";
// Add layer to map
.
.
.
In ArcGIS Runtime for .NET SDK you should use the approach that Bob Crawford said. You can also see examples from our samples
I think, a small change has to be made:
FeatureLayer myFeatureLayer = new FeatureLayer(myShapefileTable);
myFeatureLayer.DefinitionExpression = "sweet_field > 10";
// Add layer to map