8,735
社区成员
发帖
与我相关
我的任务
分享
<Application
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="ERPSilverlightDemo.App"
>
<Application.Resources>
<Style x:Key="StackPanelStyle" TargetType="{x:Type StackPanel}">
<Style.Resources>要播放的动画
<Storyboard x:Key="OnMouseLeftButtonDown1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="{x:Null}">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Style.Resources>
<Style.Triggers>鼠标按下播放动画
<EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown">
<BeginStoryboard Storyboard="{StaticResource OnMouseLeftButtonDown1}"/>
</EventTrigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>