MapTips FeatureLayer Online

This sample demonstrates specifying MapTips using the FeatureLayer's MapTips property. In the sample, the layer's OutFields are displayed on the MapTips. The OutFields property allows you to explicitly specify what fields to include with the layer.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.FeatureLayerMapTips"
    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>
            <esri:SimpleRenderer x:Key="MySimplePointRenderer">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleMarkerSymbol Color="Orange"/>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
            <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>
        <esri:Map x:Name="MyMap" WrapAround="True" Background="#FFE3E3E3">
            <esri:Map.Extent>
                <esri:Envelope XMin="-15000000" YMin="2000000" XMax="-7000000" YMax="8000000" >
                    <esri:Envelope.SpatialReference>
                        <esri:SpatialReference WKID="102100"/>
                    </esri:Envelope.SpatialReference>
                </esri:Envelope>
            </esri:Map.Extent>
            <esri:Map.Layers>
                <esri:ArcGISTiledMapServiceLayer ID="TopoMapLayer"
                    Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
                <esri:FeatureLayer ID="CitiesFeatureLayer"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/0" 
                    Where="POP1990 > 75000" 
                    Renderer="{StaticResource MySimplePointRenderer}"
                    OutFields="CITY_NAME,POP1990">
                    <esri:FeatureLayer.Clusterer>
                        <esri:FlareClusterer FlareBackground="Orange" FlareForeground="Black" MaximumFlareCount="9" />
                    </esri:FeatureLayer.Clusterer>
                    <esri:FeatureLayer.MapTip>
                        <Border CornerRadius="10" BorderBrush="Black" BorderThickness="2" Margin="0,0,15,15" Background="{StaticResource PanelGradient}">
                                <StackPanel Margin="7">
                                <TextBlock Text="{Binding [CITY_NAME]}" FontWeight="Bold" Foreground="White"  />
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="Population: " Foreground="White" />
                                    <TextBlock Text="{Binding [POP1990]}" Foreground="White" />
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </esri:FeatureLayer.MapTip>
                </esri:FeatureLayer>
            </esri:Map.Layers>
        </esri:Map>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014