Webmap With Charts Online

This sample demonstrates adding data in a WebMap document housed via ArcGIS Online (http://www.arcgis.com) in a WPF application. The WebMap.GetMapAsync Method call takes a Globally Unique Identifier (GUID) for the WebMap service provided by ArcGIS Online to obtain the geographic data layers. The WebMap's GetMapCompletedEventArgs.Map.Layers Property is used to add each layer from the web map to the WPF application for visual display. The map loaded in this sample includes pop-up windows with charts in them for the ArcGISTiledMapServiceLayers. Tap on a feature to open the pop-up window and see the chart. The Document.PopupTemplatesProperty is used to retrieve the DataTemplate for the layer's pop-up window. An InfoWindow is set to use the DataTemplate and the selected graphic to display the appropriate pop-up window, including any charts.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.WebMapWithCharts"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:esri="http://schemas.esri.com/arcgis/client/2009">
    <Grid x:Name="LayoutRoot" Background="White">
        <esri:Map x:Name="MyMap" MouseClick="MyMap_MouseClick" />
        <esri:InfoWindow x:Name="MyInfoWindow"
                         Padding="2"
                                                
                         Map="{Binding ElementName=MyMap}" >
            <esri:InfoWindow.Background>
                <LinearGradientBrush 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>
            </esri:InfoWindow.Background>
        </esri:InfoWindow>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014