Feature layer query

This sample demonstrates how to query a feature layer via feature table.

FeatureLayer query

Instructions

The sample provides a search bar on the top, where you can input the name of a US State. When you hit search the app performs a query on the feature table and based on the result either highlights the state geometry or provides an error.

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.FeatureLayerQuery.FeatureLayerQuery"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <StackPanel  Orientation="Vertical" Grid.Row="0">
            <TextBox x:Name="queryEntry" Text="New York"/>
            <Button Content="Query" Click="OnQueryClicked"/>
        </StackPanel>
        <esri:MapView x:Name="myMapView" Grid.Row="1"/>
    </Grid>

</UserControl>


In this topic
  1. Instructions
  2. Code