MapTips

This sample demonstrates the Toolkit's MapTips control. Hover over a state and you will see a MapTip appear. Click the MapTip to view the state's attributes. The MapTip control is declared inside a Canvas element in the sample's XAML. The state graphics are generated using a QueryTask in the sample's code-behind. After the GraphicsLayer has been populated with the state graphics, the MapTips control is initialized by passing the GraphicsLayer to the MapTips.GraphicsLayer property.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.LocalMapTipWidget"
    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">
        <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>
            <esri:SimpleFillSymbol x:Key="DefaultFillSymbol" Fill="#01FFFFFF" BorderBrush="#88000000" BorderThickness="2" />
        </Grid.Resources>
        <esri:Map x:Name="MyMap"  Extent="-15000000,2000000,-7000000,8000000" WrapAround="True">
            <esri:ArcGISLocalTiledLayer ID="myBaseMap" Path="..\\Data\\TPKs\\Topographic.tpk"/>
            <esri:GraphicsLayer ID="MyGraphicsLayer" />
        </esri:Map>
        <Grid HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,10,10,0" >
            <Rectangle Stroke="Gray"  RadiusX="10" RadiusY="10" Fill="{StaticResource PanelGradient}" 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 Text="Hover over a state and click to see the Toolkit MapTip." 
                Margin="25,20,25,25" TextAlignment="Center" Foreground="Black" />
        </Grid>
        <Canvas HorizontalAlignment="Left" VerticalAlignment="Top" >
            <esri:MapTip x:Name="MyMapTip"  BorderBrush="#99000000" 
                BorderThickness="1" Title="{Binding [STATE_NAME]}" VerticalOffset="10" 
                HorizontalOffset="10" Background="#DDFFFFFF" Foreground="Black"  />
        </Canvas>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014