/Visual Studio 2008/VBSL3Animation/BasicPointAnimation.xaml
XAML | 53 lines | 37 code | 1 blank | 15 comment | 0 complexity | a90ef0e8f2c41704fe84b8b26baa7e70 MD5 | raw file
- <!--/****************************** Module Header ******************************\
- * Module Name: MyPointAnimation.xaml
- * Project: VBSL3Animation
- * Copyright (c) Microsoft Corporation.
- *
- * This module shows how to write baisc PointAnimation for an EllipseGeometry
- *
- * This source is subject to the Microsoft Public License.
- * See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
- * All other rights reserved.
- *
- * History:
- * * 9/8/2009 05:00 PM Allen Chen Created
- \***************************************************************************/-->
-
- <UserControl x:Class="VBSL3Animation.BasicPointAnimation"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Width="400" Height="300">
- <UserControl.Resources>
- <Storyboard x:Name="MyAnimationStoryboard">
- <PointAnimation x:Name="MyAnimation"
- Duration="0:0:2"
- Storyboard.TargetProperty="Center"
- Storyboard.TargetName="MyAnimatedEllipseGeometry">
- </PointAnimation>
- </Storyboard>
- </UserControl.Resources>
- <Grid x:Name="LayoutRoot" Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"></RowDefinition>
- <RowDefinition Height="9*"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0">
- <TextBlock Text="Please click mouse in the green area."></TextBlock>
- </StackPanel>
- <StackPanel MouseLeftButtonDown="StackPanel_MouseLeftButtonDown" x:Name="MyStackPanel" Background="Green" Grid.Row="1">
- <Path>
- <Path.Fill>
- <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
- <GradientStop Color="#FFF1F7FB" Offset="0"/>
- <GradientStop Color="#FF3794E4" Offset="1"/>
- </LinearGradientBrush>
- </Path.Fill>
- <Path.Data>
- <!-- Describes an ellipse. -->
- <EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
- Center="50,50" RadiusX="15" RadiusY="15" />
- </Path.Data>
- </Path>
- </StackPanel>
- </Grid>
- </UserControl>