<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:vc="clr-namespace:Visifire.Charts;assembly=SLVisifire.Charts"        
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>
        <Style x:Key="ToolTipStyle" TargetType="vc:ToolTip">
            <Setter Property="IsHitTestVisible" Value="False"/>
            <Setter Property="Visibility" Value="Collapsed"/>
            <Setter Property="HorizontalAlignment" Value="Left"/>
            <Setter Property="CornerRadius" Value="4,4,4,4"/>
            <Setter Property="BorderThickness" Value="0.25,0.25,0.25,1"/>
            <Setter Property="BorderBrush" Value="#FF000000"/>
            <Setter Property="Padding" Value="10,5,10,3"/>
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush Opacity="0.9" EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFC8C8C4" Offset="0.156"/>
                        <GradientStop Color="#F0FFFFFF" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
            <Setter Property="FontFamily" Value="Portable User Interface"/>
            <Setter Property="FontSize" Value="12"/>
            <Setter Property="FontColor" Value="#FF2E2D2D"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="vc:ToolTip" >
                        <Border  Name="ToolTipBorder" Opacity="{TemplateBinding Opacity}" IsHitTestVisible="false"  Visibility="{TemplateBinding Visibility}" CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"  Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
                            <Border.Child>
                                <StackPanel >
                                    <TextBlock Name="ToolTipTextBlock" LineHeight="{TemplateBinding FontSize}" LineStackingStrategy="BlockLineHeight" TextWrapping="Wrap" Text="{TemplateBinding Text}" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Foreground="{TemplateBinding FontColor}" FontWeight="{TemplateBinding FontWeight}" FontStyle="{TemplateBinding FontStyle}"/>
                                    <Image Name="ToolTipImage" Loaded="Image_Loaded" Height="59" Width="90"></Image>
                                </StackPanel>
                            </Border.Child>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" Background="White">
        <vc:Chart Width="500" Height="300" Theme="Theme2" x:Name="MyChart">
            <vc:Chart.ToolTips>
                <vc:ToolTip Style="{StaticResource ToolTipStyle}" ></vc:ToolTip>
            </vc:Chart.ToolTips>
            <vc:Chart.Titles>
                <vc:Title Text="Visifire Chart"/>
            </vc:Chart.Titles>
            <vc:Chart.Series>
                <vc:DataSeries RenderAs="Column" Bevel="True">
                    <vc:DataSeries.DataPoints>
                        <vc:DataPoint AxisXLabel="USA" YValue="150"/>
                        <vc:DataPoint AxisXLabel="INDIA" YValue="100"/>
                    </vc:DataSeries.DataPoints>
                </vc:DataSeries>
            </vc:Chart.Series>
        </vc:Chart>
    </Grid>
</UserControl>
