PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/VBSL3Animation/BasicPointAnimation.xaml.vb

#
Visual Basic | 36 lines | 11 code | 4 blank | 21 comment | 0 complexity | d2eafef463db69b42fd73f7259e7ea95 MD5 | raw file
 1'***************************** Module Header ******************************\
 2'* Module Name:  MyPointAnimation.xaml.vb
 3'* Project:      VBSL3Animation
 4'* Copyright (c) Microsoft Corporation.
 5'* 
 6'* This module shows how to write baisc PointAnimation for an EllipseGeometry
 7'* 
 8'* This source is subject to the Microsoft Public License.
 9'* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
10'* All other rights reserved.
11'* 
12'* History:
13'* * 9/8/2009 05:00 PM Allen Chen Created
14'\**************************************************************************
15
16Partial Public Class BasicPointAnimation
17    Inherits UserControl
18
19    Public Sub New()
20        InitializeComponent()
21    End Sub
22    ''' <summary>
23    ''' Tbe following event handler change the To property of PointAnimation object,
24    ''' then begin the Storyboard to play the animation. Please note we can change
25    ''' To property even when the animation is playing.
26    ''' </summary>
27    ''' <param name="sender"></param>
28    ''' <param name="e"></param>
29    Private Sub StackPanel_MouseLeftButtonDown(ByVal sender As Object, ByVal e As MouseButtonEventArgs)
30
31        Dim targetpoint = e.GetPosition(Me.MyStackPanel)
32        Me.MyAnimation.To = targetpoint
33        Me.MyAnimationStoryboard.Begin()
34
35    End Sub
36End Class