Skip To Content ArcGIS for Developers Sign In Dashboard

WFS layer from a service

Browsing WFS layers

Loading

<?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"
             xmlns:resources="clr-namespace:Forms.Resources;assembly=ArcGISRuntime"
             x:Class="ArcGISRuntimeXamarin.Samples.BrowseWfsLayers.BrowseWfsLayers">
    <RelativeLayout>
        <esriUI:MapView x:Name="MyMapView" Style="{StaticResource MapWithFormStyle}"
                        BindingContext="{x:Reference Name=ResponsiveFormContainer}" />
        <resources:ResponsiveFormContainer x:Name="ResponsiveFormContainer">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Label Text="Select a WFS layer for display."
                           Grid.Row="0" Margin="5"
                           TextColor="Black" HorizontalTextAlignment="Center" />
                <ActivityIndicator x:Name="LoadingProgressBar"
                             Grid.Row="1"
                             IsEnabled="True"
                             IsRunning="True"
                             Margin="0,5,0,5"
                             IsVisible="True" />
                <ListView x:Name="WfsLayerList" 
                          Grid.Row="2"
                          HeightRequest="200"
                          SelectionMode="Single">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                <Label Text="{Binding Title}" />
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
                <StackLayout Grid.Row="3"
                             Margin="0,5,0,5"
                             Orientation="Horizontal">
                    <Switch x:Name="AxisOrderSwapCheckbox"
                            VerticalOptions="Center"/>
                    <Label Text="Swap coordinate order" 
                           VerticalOptions="Center"
                           HorizontalOptions="End"/>
                </StackLayout>
                <Button x:Name="LoadLayersButton" 
                        Grid.Row="4"
                        Text="Load selected layer"
                        Clicked="LoadLayers_Clicked"
                        IsEnabled="False" />
            </Grid>
        </resources:ResponsiveFormContainer>
    </RelativeLayout>
</ContentPage>

In this topic
  1. Code