<UserControl x:Class="SilverlightApplication1.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:esri="clr-namespace:ESRI.ArcGIS.Client;assembly=ESRI.ArcGIS.Client"
    xmlns:esriSymbols="clr-namespace:ESRI.ArcGIS.Client.Symbols;assembly=ESRI.ArcGIS.Client"
	xmlns:esriConverters="clr-namespace:ESRI.ArcGIS.Client.ValueConverters;assembly=ESRI.ArcGIS.Client"         
    xmlns:sys="clr-namespace:System;assembly=mscorlib"                      
    mc:Ignorable="d"
    d:DesignHeight="640" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Background="White">

        <Grid.Resources>
            <esriConverters:DictionaryConverter x:Name="MyConverter" />
            <esriSymbols:SimpleFillSymbol x:Name="MyFillSymbol" Fill="#66FF0000" BorderBrush="Red" BorderThickness="2" />
        </Grid.Resources>

        <esri:Map x:Name="MyMap"  >
            <esri:Map.Layers>
                <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" 
                    Url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
                <esri:FeatureLayer ID="MyFeatureLayer" 
                                   Url="http://zmv08/SDS/databases/AdventureWorks2008R2/Sales.vIndividualCustomerSpatial" 
                                   Where="CountryRegionName = 'United States'"
                                   >
                    <esri:FeatureLayer.Clusterer>
                        <esri:FlareClusterer FlareBackground="#99FF0000" FlareForeground="White" MaximumFlareCount="9" />
                    </esri:FeatureLayer.Clusterer>

                    <esri:FeatureLayer.OutFields>
                        <sys:String>FirstName</sys:String>
                        <sys:String>LastName</sys:String>
                        <sys:String>AddressLine1</sys:String>
                        <sys:String>City</sys:String>
                        <sys:String>StateProvinceName</sys:String>
                        <sys:String>PostalCode</sys:String>
                    </esri:FeatureLayer.OutFields>

                    <esri:FeatureLayer.MapTip>
                        <Grid Background="LightYellow">
                            <StackPanel Margin="5">
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=FirstName, Mode=OneWay}" FontWeight="Bold" />
                                    <TextBlock Text=" " />
                                    <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=LastName, Mode=OneWay}" FontWeight="Bold" />
                                </StackPanel>
                                <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=AddressLine1, Mode=OneWay}" FontWeight="Bold" />
                                <StackPanel Orientation="Horizontal">
                                    <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=City, Mode=OneWay}" FontWeight="Bold" />
                                    <TextBlock Text=" " />
                                    <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=StateProvinceName, Mode=OneWay}" FontWeight="Bold" />
                                    <TextBlock Text=" " />
                                    <TextBlock Text="{Binding Converter={StaticResource MyConverter}, 
                                    ConverterParameter=PostalCode, Mode=OneWay}" FontWeight="Bold" />
                                </StackPanel>

                            </StackPanel>
                            <Border BorderBrush="Black" BorderThickness="1" />
                        </Grid>
                    </esri:FeatureLayer.MapTip>

                </esri:FeatureLayer>
            </esri:Map.Layers>
        </esri:Map>
    </Grid>
</UserControl>
