FeatureLayer JSON

This sample demonstrates how to use the FeatureLayer.FromJson method to deserialize a ArcGIS Json feature layer to a native FeatureLayer. An ArcGIS Json feature layer consists of a layer definition and feature set.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.FeatureLayerFromJson"
             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/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <LinearGradientBrush x:Key="PanelGradient" EndPoint="0.5,1" StartPoint="0.5,0">
                <LinearGradientBrush.RelativeTransform>
                    <TransformGroup>
                        <ScaleTransform CenterY="0.5" CenterX="0.5"/>
                        <SkewTransform CenterY="0.5" CenterX="0.5"/>
                        <RotateTransform Angle="176" CenterY="0.5" CenterX="0.5"/>
                        <TranslateTransform/>
                    </TransformGroup>
                </LinearGradientBrush.RelativeTransform>
                <GradientStop Color="#FF145787" Offset="0.16"/>
                <GradientStop Color="#FF3D7FAC" Offset="0.502"/>
                <GradientStop Color="#FF88C5EF" Offset="0.984"/>
            </LinearGradientBrush>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="395"/>
        </Grid.ColumnDefinitions>
        <esri:Map x:Name="MyMap" Extent="-15000000,2000000,-7000000,8000000" WrapAround="True" Grid.Column="0">
            <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                      Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        </esri:Map>
        <Grid Margin="5" Grid.Column="1" Background="White" VerticalAlignment="Stretch">
            <Grid.RowDefinitions>
                <RowDefinition Height="50" />
                <RowDefinition />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Horizontal" Grid.Row="0">
                <Button Content="Clear Map" Width="172" Click="Button_ClearMap" Margin="10" />
                <Button Content="Create FeatureLayer from JSON" Width="172" Click="Button_Load" Margin="10" />
            </StackPanel>
            <ScrollViewer Grid.Row="1">
                <TextBox x:Name="JsonTextBox" FontSize="12" />
            </ScrollViewer>
        </Grid>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014