Read shapefile metadata

This sample demonstrates how to open a shapefile stored on the device, read metadata that describes the dataset, and display it as a feature layer with default symbology.

Metadata for a shapefile dataset

Instructions

The shapefile will be downloaded from an ArcGIS Online portal automatically.

Code

<UserControl 
    x:Class="ArcGISRuntime.WPF.Samples.ReadShapefileMetadata.ReadShapefileMetadata"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">
    <Grid>
    <esri:MapView x:Name="MyMapView" />
        <Border HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30"
                BorderBrush="DarkGray" BorderThickness="3"
                Background="LightGray"
                Width="300">
            <StackPanel x:Name="InfoPanel"
                        Orientation="Vertical"
                        Margin="20">
                <TextBlock Margin="5"
                           FontWeight="Bold"
                           Text="{Binding Credits}"/>
                <TextBlock MaxWidth="260"
                           TextWrapping="Wrap"
                           Text="{Binding Summary}"/>
                <Image x:Name="ShapefileThumbnailImage"
                       Margin="10"/>
                <StackPanel Orientation="Horizontal">
                    <TextBlock FontWeight="Bold"
                               Text="Tags:"/>
                    <ListBox Height="80" Width="180"
                             Margin="10,0"
                             ItemsSource="{Binding Tags}"/>
                </StackPanel>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Instructions
  2. Code