ArcGIS Runtime SDK for .NET Samples

Create a feature collection layer from a portal item

FeatureCollectionLayer from a portal item
Loading

Code

<UserControl x:Class="ArcGISRuntime.WPF.Samples.FeatureCollectionLayerFromPortal.FeatureCollectionLayerFromPortal"
             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 BorderBrush="Black" BorderThickness="1" Background="White"
                HorizontalAlignment="Right" VerticalAlignment="Top"
                Margin="30" Padding="20" Width="375">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <TextBlock Text="Supply an item ID then click 'Open from portal item'."
                           Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
                           TextAlignment="Center" FontWeight="SemiBold" />
                <TextBlock Text="Item ID:"
                           Grid.Row="1" Grid.Column="0"
                           Margin="0,5,5,0"
                           VerticalAlignment="Center" />
                <TextBox x:Name="CollectionItemIdTextBox"
                         Grid.Row="1" Grid.Column="1"
                         Margin="0,5,0,0" />
                <Button x:Name="OpenPortalFeatureCollectionButton"
                        Content="Open from portal item"
                        Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2"
                        Margin="0,5,0,0"
                        Click="OpenPortalFeatureCollectionClick" />
            </Grid>
        </Border>
    </Grid>
</UserControl>


In this topic
  1. Code