Feature layer definition expression

This sample demonstrates how to apply definition expression to a feature layer for filtering features. It also shows how to reset the definition expression.

FeatureLayer with definition expression

Code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
             xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime"
             x:Class="ArcGISRuntimeXamarin.Samples.FeatureLayerDefinitionExpression.FeatureLayerDefinitionExpression">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Button Clicked="OnApplyExpressionClicked" Text="Apply Expression" Grid.Row="0" Grid.Column="0" />
        <Button Clicked="OnResetButtonClicked" Text="Reset" Grid.Row="0" Grid.Column="1" />
        <esriUI:MapView x:Name="MyMapView" Grid.Row="1" Grid.ColumnSpan="2" />
    </Grid>
</ContentPage>


In this topic
  1. Code