Template Picker Online

This sample demonstrates being able to add features and their associated attributes in two FeatureLayers using the ESRI.ArcGIS.Client.Toolkit TemplatePicker.

To use the sample, select a template from the picker, and draw a feature on the map. Modify attributes and click Apply to finish.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.ToolkitTemplatePicker"
    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" 
    xmlns:slData="http://schemas.microsoft.com/wpf/2008/toolkit"   
   >

    <Grid x:Name="LayoutRoot">
        <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"/>
                <GradientStop Color="#FF3D7FAC" Offset="0.184"/>
                <GradientStop Color="#FF88C5EF" Offset="0.984"/>
            </LinearGradientBrush>
        </Grid.Resources>
        <esri:Map x:Name="MyMap" WrapAround="True">
            <esri:ArcGISTiledMapServiceLayer ID="BaseLayer" 
                                Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
            <esri:FeatureLayer ID="Evacuation Perimeter" DisableClientCaching="True" 
                               AutoSave="True"
                               Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/1" 
                               />
            <esri:FeatureLayer ID="Points of Interest" DisableClientCaching="True" 
                               AutoSave="True"
                               Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"
                               />
        </esri:Map>

        <Border Background="{StaticResource PanelGradient}" BorderThickness="1" CornerRadius="5"
                        HorizontalAlignment="Right"  VerticalAlignment="Top"
                        Padding="5" BorderBrush="Black" Margin="5">
            <Border.Effect>
                <DropShadowEffect Color="Black" Direction="-45" BlurRadius="20" Opacity=".75" />
            </Border.Effect>
            <esri:TemplatePicker Map="{Binding ElementName=MyMap, Mode=OneWay}"
                                        LayerIDs="Points of Interest,Evacuation Perimeter" />
        </Border>


        <Grid HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,10,0"  >
            <Rectangle Fill="{StaticResource PanelGradient}" Stroke="Gray"  RadiusX="10" RadiusY="10" Margin="0,0,0,5">
                <Rectangle.Effect>
                    <DropShadowEffect/>
                </Rectangle.Effect>
            </Rectangle>
            <Rectangle Fill="#FFFFFFFF" Stroke="DarkGray" RadiusX="5" RadiusY="5" Margin="10,10,10,15" />
            <TextBlock x:Name="ResponseTextBlock" Text="Select a template from the picker, and draw a feature on the map." 
                       Width="200" TextAlignment="Left" Margin="30,20,30,30" TextWrapping="Wrap" Foreground="Black" />
        </Grid>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014