- silverlightintroduction_src.zip
- CSSL3Animation
- CSSL3DeepZoom
- CSSL3DeepZoom.sln
- CSSL3DeepZoom.Web
- App_Code
- Bin
- DeepZoomTools.DLL
- DeepZoomTools.DLL.refresh
- ClientBin
- GeneratedImages
- Default.html
- GenerateDeepZoomService.svc
- Silverlight.js
- SourceImages
- atom.png
- background.jpg
- cell.png
- dna.png
- Molecular.png
- neutron.png
- seed.png
- wrap in bamboo.png
- Web.config
- CSSL3DeepZoom
- ReadMe.mht
- CSSL3HTMLBridge
- CSSL3Input
- CSSL3LocalMessage
- CSSL3MediaElement
- CSSL3PixelShader
- CSSL3WriteableBitmap
- VBSL3Animation
- VBSL3DeepZoom
- VBSL3DeepZoom.sln
- VBSL3DeepZoom.Web
- App_Code
- App_Data
- Bin
- DeepZoomTools.DLL
- DeepZoomTools.DLL.refresh
- ClientBin
- GeneratedImages
- Default.html
- GenerateDeepZoomService.svc
- Silverlight.js
- SourceImages
- atom.png
- background.jpg
- cell.png
- dna.png
- Molecular.png
- neutron.png
- seed.png
- wrap in bamboo.png
- Web.config
- VBSL3DeepZoom
- VBSL3HTMLBridge
- VBSL3Input
- VBSL3LocalMessage
- VBSL3MediaElement
- VBSL3PixelShader
|
<!--/****************************** Module Header ******************************\
* Module Name: UsingKeyFrames.xaml
* Project: VBSL3Animation
* Copyright (c) Microsoft Corporation.
*
* This module shows how to create KeyFrames based animation in Silverilght
*
* 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.UsingKeyFrames"
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">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="-4" KeySpline="1,0,1,1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="-5" KeySpline="0,0,0,1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="-4" KeySpline="1,0,1,1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="path" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
<SplineDoubleKeyFrame KeyTime="00:00:00.8000000" Value="167" KeySpline="1,0,1,1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="109" KeySpline="0,0,0,1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01.2000000" Value="167" KeySpline="1,0,1,1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="1*"></RowDefinition>
<RowDefinition Height="9*"></RowDefinition>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Button Content="Please click me to play animation" Click="Button_Click"></Button>
</StackPanel>
<StackPanel x:Name="MyStackPanel" Background="Orange" Grid.Row="1">
<Path x:Name="path" RenderTransformOrigin="0.5,0.5">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
<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>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Microsoft All-In-One Code Framework delineates the framework and skeleton of Microsoft development techniques through typical sample codes in three popular programming languages (Visual C#, VB.NET, Visual C++). Each sample is elaborately selected, composed, and documented to demonstrate one frequently-asked, tested or used coding scenario based on our support experience in MSDN newsgroups and forums. If you are a software developer, you can fill the skeleton with blood, muscle and soul. If you are a software tester or a support engineer like us, you may extend the sample codes a little to fit your specific test scenario or refer your customer to this project if the customer's question coincides with what we collected.
http://cfx.codeplex.com/