Draw line animation in silverlight

I have map image from internet,if i click a point on map ,lets say a ellipse i created for a city,when i click on it a animated line is to be drawn from that city to another point on map, how can i do it.
zameer21Asked:
Who is Participating?
 
CuteBugConnect With a Mentor Commented:
Here is a simple Line animation
<Window x:Class="LineAnimation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow"
        Height="514"
        Width="673">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="40"></RowDefinition>
        </Grid.RowDefinitions>
        <Canvas>
            <Line x:Name="line"
                  X1="10"
                  Y1="10"
                  X2="10"
                  Y2="10"
                  Stroke="Red"></Line>
        </Canvas>
        <Button Grid.Row="1" Height="30"
                Width="100"
                Content="Start">
            <Button.Triggers>
                <EventTrigger RoutedEvent="Button.Click">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="line"
                                             Storyboard.TargetProperty="X2"
                                             To="500"
                                             Duration="0:0:5"></DoubleAnimation>
                            <DoubleAnimation Storyboard.TargetName="line"
                                             Storyboard.TargetProperty="Y2"
                                             To="250"
                                             Duration="0:0:5"></DoubleAnimation>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Button.Triggers>
        </Button>
    </Grid>
</Window>

Open in new window

0
All Courses

From novice to tech pro — start learning today.