/Visual Studio 2008/VBSL3Animation/CodeBehindCreation.xaml
XAML | 45 lines | 28 code | 1 blank | 16 comment | 0 complexity | a3852c08454c2ffc881d8f00346f0af3 MD5 | raw file
- <!--/****************************** Module Header ******************************\
- * Module Name: CodeBehindCreation.xaml
- * Project: VBSL3Animation
- * Copyright (c) Microsoft Corporation.
- *
- * This module shows how to initialize a Storyboard in code behind. The final effect
- * is the same as BasicPointAnimation.xaml, which uses XAML to add Storyboard.
- *
- * 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/10/2009 03:00 PM Allen Chen Created
- \***************************************************************************/-->
-
- <UserControl x:Class="VBSL3Animation.CodeBehindCreation"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- Width="400" Height="300">
- <Grid x:Name="LayoutRoot" Background="White">
- <Grid.RowDefinitions>
- <RowDefinition Height="1*"></RowDefinition>
- <RowDefinition Height="9*"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0">
- <TextBlock Text="Please click mouse in the gray area."></TextBlock>
- </StackPanel>
- <StackPanel MouseLeftButtonDown="MyStackPanel_MouseLeftButtonDown" x:Name="MyStackPanel" Background="Gray" 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>