Windows 8 Store Apps学习(20) 动画: ThemeAnimation(主题动画)2013-12-04 cnblogs webabcd介绍重新想象 Windows 8 Store Apps 之 动画PopInThemeAnimation - 控件出现时的动画, PopOutThemeAnimation - 控件消失时的动画FadeInThemeAnimation - 控件淡入的动画, FadeOutThemeAnimation - 控件淡出的动画PointerDownThemeAnimation - 鼠标(手指)在控件上按下时的动画, PointerUpThemeAnimation - 鼠标 (手指)在控件上抬起时的动画SwipeHintThemeAnimation - 控件的 Swipe 动画(当你的控件在收到 Swipe 后会做响应时), SwipeBackThemeAnimation - 控件的 Swipe 动画(当你的控件在收到 Swipe 后不需要做任何响应时)RepositionThemeAnimation - 控件重新定位时的动画SplitOpenThemeAnimation - 打开“拆分”控件的动画, SplitCloseThemeAnimation - 关闭“拆分”控件 的动画DragItemThemeAnimation, DragOverThemeAnimation, DropTargetItemThemeAnimation - 顾名思义的一些 动画效果,用于集合类的控件示例1、演示主题动画之 PopIn, PopOutAnimation/ThemeAnimation/PopInPopOut.xaml
<Pagex:Class="XamlDemo.Animation.ThemeAnimation.PopInPopOut"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="using:XamlDemo.Animation.ThemeAnimation"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"mc:Ignorable="d"><Grid Background="Transparent"><StackPanel Margin="120 0 0 0"><StackPanel.Resources><!--PopInThemeAnimation - 控件出现时的动画FromHorizontalOffset - 控件起始位置的水平偏移量FromVerticalOffset - 控件起始位置的垂直偏移量--><Storyboard x:Name="storyboardPopIn"><PopInThemeAnimation Storyboard.TargetName="border" FromHorizontalOffset="1000" FromVerticalOffset="300" /></Storyboard><!--PopOutThemeAnimation - 控件消失时的动画--><Storyboard x:Name="storyboardPopOut"><PopOutThemeAnimation Storyboard.TargetName="border" /></Storyboard></StackPanel.Resources><Border Name="border" BorderThickness="5" BorderBrush="Red" Background="Blue" CornerRadius="10" Width="400" Height="100" HorizontalAlignment="Left"><Border.Child><TextBlock Text="我是 Border 里的内容" FontSize="24.667" TextAlignment="Center" VerticalAlignment="Center" /></Border.Child></Border><Button Name="btnPopIn" Content="PopInThemeAnimation Demo" Click="btnPopIn_Click_1" Margin="0 30 0 0" /><Button Name="btnPopOut" Content="PopOutThemeAnimation Demo" Click="btnPopOut_Click_1" Margin="0 10 0 0" /></StackPanel></Grid></Page>